Code Beautifier
JSON & Data

Client-side vs server-side formatters

What actually happens to a pasted payload on the two kinds of formatter site, how to tell which one you are using, and what each can and cannot do.

Every online formatter looks the same: a text box, a button, a result. Underneath there are two completely different designs, and the difference decides where your data goes. This is a description of both, as fairly as we can manage given that we built one of them, with the honest limits of each.

The server-side design

You paste, the page sends the text to a server, the server formats it, the result comes back. This is how most formatter sites have worked since the category existed, and it has real advantages:

  • Any language. The server can run a Python formatter, a Rust formatter, a Java compiler, anything with a command line. The browser cannot.
  • No download cost. The parsing libraries live on the server; the page is small.
  • No memory ceiling. A server can format a file larger than a browser tab could hold.

The cost is the obvious one: your text left your machine. What happens to it next depends entirely on the operator. Most such sites are funded by display advertising, most say nothing specific about retention, and a production API response with a bearer token in it is now in someone else's request log. Not necessarily misused — but not in your control, either.

The client-side design

You paste, JavaScript in your own tab parses and formats the text, the result renders. No request is made. The formatter code was downloaded when the page loaded, and from then on the site could be offline.

The advantages mirror the other design's costs:

  • The data never leaves. This is verifiable, not promised: open the network panel, format something, and watch nothing happen.
  • It works offline once the code is cached.
  • The operator cannot see your input even if they wanted to, which simplifies every privacy conversation.

And the limits mirror the other design's advantages:

  • Only languages with a JavaScript implementation. JSON, YAML, XML, SQL, CSS, HTML, JavaScript and the like all have good ones. A server-side Python or Rust formatter has no client-side equivalent, so a client-side site simply does not offer those tools.
  • Download size is a constant constraint. Every parser ships to the browser. On this site the JSON family is around 486 KB and the markup family around 585 KB, loaded only for the tool that needs them and run in a Web Worker so large inputs do not freeze the page. It is engineering that the server-side design never has to do.
  • A browser tab has a memory ceiling. Files in the hundreds of megabytes are a server's job.

How to tell which kind you are using

Open the browser's developer tools, switch to the Network panel, clear it, and click Format. A client-side tool produces no request. A server-side tool produces a POST — usually to an /api/format or similar — and the request body is your text.

That test takes ten seconds and is more reliable than any privacy policy, because it shows what the page does rather than what it says.

Which to use

Use a server-side formatter when you need a language the browser cannot handle, or a file too large for a tab, and the content is not sensitive. Public sample data, an open-source config, a snippet from documentation: there is no reason to care where it goes.

Use a client-side formatter for anything you would not paste into a stranger's text box: API responses, tokens, customer records, database schemas, configuration with credentials in it. The category of "things developers actually format" is mostly this second list, which is why the design matters more than it first appears.

What this site is

Every tool on codebeautifier.app is client-side; there is no formatting server to send anything to. JSON Formatter is the place to run the network-panel test. JWT Decoder goes one step further for credential-shaped input: it saves no draft, keeps no history and offers no share link, because the design should protect a token even from the user's own browser storage. And SQL Formatter handles the case that most often contains something proprietary — a schema.

The trade for that is the list of limits above, stated plainly: no Python, no Rust, no gigabyte files. We think it is the right trade for a formatter. If you need the other side of it, a server-side tool is the correct choice, and worth using with data that can stand the trip.