JSON formatter – Free & Private
Pretty-print, minify and check JSON. Big files run in the background. Nothing leaves your browser.
Short answer
To format JSON, paste it in the left box or drop a .json file. This JSON formatter shows it indented and coloured on the right, with a tree view to fold big objects, and points out any error by line and column. You can also minify or sort keys. Nothing leaves your browser, so API responses and keys stay private.
How to use JSON formatter
- Step 1
Paste your text, open a file, or press “Sample”.
- Step 2
Pick the options you need. The result updates as you type.
- Step 3
Copy the result or download it.
Settings explained
- Indent
- How far each level is pushed in.
- Sort keys
- Puts keys in A–Z order, handy for comparing files.
- View
- Tree lets you fold and unfold big objects.
Keyboard shortcuts
- Paste into the input
- Ctrl V
- Format now (JSON)
- Ctrl Enter
- Search all tools
- Ctrl K
Tips for better results
- Press Ctrl Enter to format JSON straight away.
- Use Tree view to explore deeply nested API responses.
- Sort keys before comparing two JSON files so differences stand out.
What it does
- 2 spaces, 4 spaces or tab
- Minify
- Tree view
- Error line highlight
- Sort keys
- Files up to 50 MB
Questions
How do I pretty-print JSON?
Paste your JSON on the left. The formatted version appears on the right straight away. Press Copy or Download.
Is my data sent to a server?
No. Formatting happens in your browser, so API keys and private data stay on your computer.
What is the difference between a JSON formatter and a JSON beautifier?
None. Both pretty print JSON with indentation so it is easy to read. Minify does the opposite.
Can it format large JSON files?
Yes. Files up to about 50 MB work; large files are checked when you press the button instead of while you type.
Can it fix broken JSON?
It suggests one-click fixes for common mistakes such as trailing commas, single quotes and unquoted keys.
Related tools
Runs in your browser · Updated · Report a problem