What it does
JSON is the plain-text format that websites, apps and settings files use to pass data around. It is easy for computers to read and hard for people to read when it is squashed onto one line. This tool lays it out with line breaks and indents (pretty-print), squeezes it back down to the smallest size (minify), sorts the keys from A to Z so two files can be compared, and shows the data as a tree you can fold and open.
If the JSON has a mistake, the tool says exactly where: the line and column of the first problem, what it expected, and a short excerpt with an arrow under the spot. Everything runs in your browser, so private data, tokens and API replies never leave your device. Once you have tidy JSON, JSON compare shows what changed against another version, and config converter turns it into YAML, XML, TOML or CSV.
How to use it
- Paste your JSON into the box. The result appears straight away, and a valid example is already loaded.
- Pick what you want: Pretty-print, Minify, Escape as string or Unescape string.
- Choose the indent (2 spaces, 4 spaces or a tab) and tick Sort keys if you want them in order.
- Press Copy result or Download. Open the tree to browse a large document.
What each setting does
- Pretty-print: puts each key and list item on its own line, indented by the width you choose.
- Minify: removes every space and line break. The data is the same, only smaller.
- Sort keys A to Z: reorders the keys of every object alphabetically (lists keep their order). Useful before comparing two files.
- Escape as string: turns any text, such as a block of JSON, into one quoted JSON string with
\"and\nin place, ready to paste into code or another JSON field. - Unescape string: the reverse. Paste
"say \"hi\"\nok"and get the real text on two lines. - Tree view: every object and list can be folded. The first two levels start open.
Worked example
The example {"name":"fibub","tags":["free","private"],"size":{"w":10,"h":2.5},"live":true,"note":null} is 90 characters. Pretty-printed with 2 spaces it becomes 13 lines and 139 characters. If you paste five lines where line 3 is "b": [1, 2,], the tool says “Mistake at line 3, column 14: A trailing comma before ”]” is not allowed”, because JSON, unlike JavaScript, forbids a comma after the last item.
FAQs
Is my JSON uploaded anywhere? No. It is read and written by your own browser and never sent to a server.
Why does it reject single quotes or comments? Real JSON allows only double-quoted strings and no comments. The error message tells you which one it found.
Does it keep very large numbers exactly? Numbers are read as ordinary JavaScript numbers, so integers above 9,007,199,254,740,991 lose their last digits. Keep such IDs as strings.
Does sorting change the meaning? For objects, no: key order carries no meaning in JSON. Lists are never reordered.
How big a file can it handle? A few megabytes is fine. The tree view is skipped above about 20,000 values to keep the page quick.
Where the numbers come from
- JSON syntax as defined in RFC 8259 and ECMA-404, checked by fibub's own small parser. fibub's own working.
Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.
Read more on the Blog
- What JSON is, its syntax rules, and how to read a JSON error(the full guide)
Last updated 2026-12-05.