JSON Formatter
Pretty-print, minify, and validate JSON, with the exact line and column of any parse error. Nothing you paste ever leaves this tab.
0 characters
Nothing you type here is sent anywhere.
What this tool does
JSON Formatter takes JSON — an API response, a config file, a log line, a payload you're debugging — and either prettifies it into readable, indented text or minifies it down to a single compact line. It also validates as you go: if the JSON is malformed, it tells you the line and column where parsing broke, rather than leaving you to scan a wall of text for a missing comma or an unclosed bracket.
There's no upload step and no button to press for the common case — paste or type, and the formatted result appears as you go, updating automatically a moment after you stop typing.
How to use it
Paste JSON into the input box. Choose Pretty or Minify, and if you're prettifying, pick 2 spaces, 4 spaces, or a tab for indentation. The formatted output appears below automatically. If the input isn't valid JSON, the error message names the exact line and column so you can jump straight to the problem instead of re-reading the whole thing.
Copy the result with one click, or download it as a `.json` file. Clear the input any time to start over.
Why nothing leaves your device
JSON is where a lot of sensitive material ends up, often without much thought — API responses that include auth tokens, config files with database credentials and API keys, webhook payloads carrying a customer's name, email, or order details. Pasting any of that into a typical online JSON formatter means it crosses the network to a server you don't control, gets processed there, and may or may not be logged along the way. That's a real exposure, not a hypothetical one, and it's exactly the kind of paste people do dozens of times a day without stopping to think about where the tool actually runs.
This one runs entirely as JavaScript already loaded into your browser tab. `JSON.parse` and `JSON.stringify` are built into the browser itself — there's no server-side step to reach for, so there's nothing to send. Open your browser's network tab while you use it and you'll see no request carrying anything you typed. Close the tab and nothing about what you pasted is kept anywhere, on this device or anywhere else.
What this does well — and what it doesn't
This handles any valid JSON document, however deeply nested, and reports parse errors with a precise line and column rather than a generic exception. Formatting and minifying both preserve the underlying data exactly — this is a display and validation tool, not a transformer, so it never reorders keys, changes types, or silently drops anything.
It doesn't validate against a schema (JSON Schema, OpenAPI, or otherwise) — it only checks that the text is syntactically valid JSON, not that the shape matches what an API or app expects. And extremely large inputs (tens of megabytes) can feel sluggish, since formatting happens on the main thread the same way it would in any other JSON tool; for typical API responses and config files, it's instant.