Paste JSON
Result
A no-fuss tool for the messy JSON you get back from APIs, config files and logs: paste it in and beautify, validate or minify it. Beautify expands the structure with your choice of indentation — 2 spaces, 4 spaces or a tab — so nesting is easy to read; minify strips every space and newline to pack it onto one line. When the syntax is broken it tells you the exact line and column of the error, so a missing comma or unclosed bracket is quick to find. Turn on "Sort keys" to reorder object keys alphabetically all the way down the tree, which keeps diffs stable when you compare two JSON documents (array order is preserved). The output updates live as you type and copies with one click. Because JSON so often carries API keys, personal data or production payloads, this tool does all of its formatting, validation and minifying entirely inside your browser — nothing is uploaded, stored or sent to a server. You can safely paste internal data and real API responses.
How to use
- Paste your JSON into the input box on the left (use "Sample" to try it with an example).
- Choose Beautify or Minify in the toolbar, pick the indentation, and optionally sort keys.
- The result appears instantly on the right, with syntax errors shown by line and column. Click "Copy" to grab the output. Nothing you paste is sent anywhere.
FAQ
Is the JSON I paste uploaded anywhere?
No. Beautifying, validating and minifying all run in your browser with JavaScript. Your JSON is never uploaded, stored, or sent to a server, so it's safe to paste data containing API keys, personal information or production payloads.
Where does it show JSON syntax errors?
If the JSON is invalid, the status line shows the error with its exact line and column instead of producing output. That makes it easy to pinpoint a missing or extra comma, an unclosed bracket, or an unquoted string.
What's the difference between Beautify and Minify?
Beautify expands the JSON with your chosen indentation (2 spaces, 4 spaces or a tab) so it's readable. Minify removes all whitespace and newlines to produce a single compact line, reducing size. The output also shows the result length next to the original length.
What does "Sort keys" do?
It reorders object keys alphabetically, recursively through every nested object. Array element order is left unchanged. Sorting keys on both documents makes a side-by-side comparison or a text diff far more stable.
Does it accept JSON with comments (JSONC) or trailing commas?
No. It validates against the standard JSON specification, so comments or trailing commas are reported as syntax errors. That's intentional — it helps you catch mistakes in real config files. Remove comments and trailing commas before pasting.
Can it handle large JSON?
Yes. Since everything runs locally there's no network round-trip — it uses your machine's performance. Files from a few hundred KB up to a few MB format comfortably on a typical computer (very large files depend on your browser's available memory).