JSON Pretty Print
Pretty print JSON with 2, 3 or 4 spaces, or tabs. Instant, private and free of size limits.
Input
Output
Ready
Drop a file to load it
About this tool
Indent JSON the way you want to read it. Choose two, three or four spaces, or tabs, and the document is re-emitted with consistent spacing throughout.
When you would use it
- Matching a repository’s indentation style before committing a fixture
- Making a log line readable
- Producing consistent diffs by normalising formatting first
Worked example
{"a":{"b":1}}
{
"a": {
"b": 1
}
}
Things worth knowing
- Empty objects and arrays stay compact as
{}and[]rather than being split across lines. - Indentation is applied uniformly, so re-formatting an inconsistently indented file normalises it.
Questions
Frequently asked
Which indentation should I use?
Two spaces is the most common convention for JSON and what most formatters default to. Tabs are worth choosing if your team’s editor config uses them, since it keeps diffs clean.
Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Does it work offline?
Yes. JSONWorks is installable as a progressive web app and caches itself on first visit, so every tool keeps working without a connection.
Related