JSON formatter & validator
Format, validate, and minify JSON. Free, private — nothing leaves your browser.
Your beautified code will appear here.Related tools
Beautify & minify code
Beautify or minify JSON, JavaScript, HTML, CSS, and YAML. Choose your indent, nothing is uploaded.
Convert JSON, CSV & YAML
Convert JSON, CSV, and YAML in any direction — CSV and YAML convert through JSON automatically.
Base64 encode/decode
Encode text to Base64 or decode Base64 back to text, instantly.
Everything you need to work with JSON
Format and validate in one step
Valid JSON is pretty-printed. Invalid JSON shows what went wrong and where.
Your choice of indent
2 spaces, 4 spaces, or tabs, or minify to the smallest possible size.
Instant, live output
The result updates as you type or paste. No button to click and no page reload.
Numbers left exactly as written
Long IDs and values like 1.0 are not rounded or rewritten, unlike a plain parse and re-stringify.
Copy or download
Copy the result to your clipboard or save it as a .json file.
100% private
Your JSON never leaves your browser. Nothing is uploaded, logged, or stored.
Format JSON in three steps
- 1
Paste your JSON
Paste or type JSON into the input box. It can be minified, one long line, or already half-formatted.
- 2
Check the result
Valid JSON appears pretty-printed straight away. Invalid JSON shows an error that points at the position of the first problem.
- 3
Pick an indent, then copy or download
Choose 2 spaces, 4 spaces, or a tab, or switch to Minify for the smallest size. Copy the result or download it as a .json file.
Built for everyday developer work
JSON comes back from APIs as one long line and gets broken by one missing comma. Formatting makes it readable, and validating tells you exactly where it is wrong.
Reading an API response
Paste a one-line response from your browser or curl and see its structure laid out.
Debugging a config file
Find the missing comma or quote in a package.json, tsconfig, or settings file.
Cleaning up fixtures and logs
Make JSON copied from logs or test data match one consistent indent before it goes into a repo.
Sharing readable JSON
Format a payload before pasting it into a ticket, a doc, or a chat message.
Frequently asked questions
What does a JSON formatter do?
+
It re-writes JSON with line breaks and indentation so a person can read it. The data does not change. Only the spacing outside strings does, so the formatted JSON parses to exactly the same object.
Does this also validate my JSON?
+
Yes. The formatter parses your input first, so any JSON that formats is valid JSON. If it is not, you get an error with the position of the first problem instead of an output.
Why does it say my JSON is invalid?
+
JSON is stricter than a JavaScript object. Keys must be in double quotes, single quotes are not allowed, comments are not allowed, and a trailing comma after the last item is an error. Fix the spot the message points to and the output appears.
Will formatting change my numbers or key order?
+
No. Keys stay in their original order and every value is copied through exactly as you typed it, including 20-digit IDs and numbers like 1.0 that JavaScript would otherwise round or rewrite.
Can I choose the indentation?
+
Yes. Pick 2 spaces, 4 spaces, or a tab. The output updates as soon as you change it.
How do I minify JSON instead?
+
Switch the toggle from Beautify to Minify. It strips every space and line break outside strings, which is what you want before embedding JSON in a request or a config value.
Is my JSON uploaded anywhere?
+
No. Formatting runs entirely in your browser with JavaScript. Nothing you paste is sent to a server, logged, or stored, so it is safe to use on API responses and config files that contain private data.
Format your JSON now
Free, no account needed.