All text tools

> text json

Format and validate JSON

The response of an API, a config file, an export: here it becomes readable, and the one missing comma stands out right away.

Pasting is enough, the result appears right away. You can also drag a .json file here.

Nothing entered yetPaste JSON above. It is checked and formatted as you type.
Indentation

It is checked and formatted as you type. From 2 MB only on button press, from 10 MB not at all.

Save as .json

More for text: Compare two versions · Count characters, sort lines · Markdown · Test regex

Your JSON stays on this device. Nothing is saved or transmitted.

How it works
  1. 01Paste JSON or open a file. If everything is fine, the formatted result appears right below.
  2. 02If something is wrong, the box tells you the line and column and what is missing there. “Mark the spot” jumps to it.
  3. 03Choose an indentation or make it compact, sort keys if you like, then copy it or save it as a file.

JSON is checked against the JSON standard (RFC 8259): only double quotes, no comments, no comma after the last entry. Line and column count from 1, and a tab counts as one character. The output rewrites numbers: 1.50 becomes 1.5, 1e2 becomes 100. Whole numbers above 9,007,199,254,740,992 (that is 2 to the power of 53, a 16-digit number) and decimals with more than 15 digits cannot always be held exactly by the browser, and extremely large or small values like 1e400 or 1e-400 are lost completely. If that happens, the tool tells you. With very deeply nested JSON, the indented version becomes many times larger than the input. If it would get so large that the browser freezes, the tool says so and you still get there with “Compact (one line)”. Sorting is alphabetical with natural number order (“point2” before “point10”). Without sorting, the order of the keys stays as it was, except that keys that look like whole numbers are always moved to the front by JavaScript.