Format JSON
Pretty-prints JSON with 2 or 4 spaces or tabs and optionally sorts the keys.
Runs in your browser – your file is never uploaded
Frequently asked questions
Is my file uploaded?
No. The conversion runs entirely in your browser. The file never leaves your device – there is no server that could see it. Once the page has loaded, the tool even works offline.
What does the formatter change?
Only whitespace: every object and array is broken onto separate lines and indented as you choose. Values, strings and – unless you enable sorting – the order of keys stay exactly as they were.
It reports an error with a line and column. What now?
Open the file in an editor and jump to that position. The usual culprits are a trailing comma after the last item, single quotes instead of double quotes, comments, or an unquoted key – none of these are allowed in JSON.
How large can the file be?
Everything runs in your browser, so the limit is your device's memory. Files of a few dozen megabytes are fine; very large exports may take a moment.
Related tools
Minify JSON
Removes all whitespace from JSON so it takes as little space as possible.
● In your browser
JSON to TypeScript interfaces
Generates TypeScript interfaces from a JSON sample, with optional fields and unions.
● In your browser
Convert CSV to JSON
Turns a CSV table into a JSON array, with automatic separator detection.
● In your browser
Convert JSON to CSV
Turns a JSON array of objects into a CSV table for Excel and spreadsheets.
● In your browser
Compare two text files
Shows the differences between two text files as a unified diff or side by side.
● In your browser
Word count and text statistics
Counts words, characters, sentences and paragraphs and estimates the reading time.
● In your browser