JSON Formatter

Pretty-print, validate, or minify JSON with helpful error messages.

100% in your browser · no uploads · no ad trackers

About JSON Formatter

JSON Formatter validates JSON syntax, pretty-prints it with consistent indentation, or minifies it for transport. The error messages point to the exact line and column that broke parsing - saving you from squinting at a wall of one-line API output.

Input

0 B

Formatted output

Enter valid JSON to see the tree.

JSONPath query

-

Examples: $.tools[*].id · $..popular · $.tools[?(@.popular==true)]

How to use

  1. 1.Paste JSON.
  2. 2.Pick format / minify.
  3. 3.Copy result.

FAQ

Does it support JSON5 or JSONC?
Strict JSON only. JSON5 features like trailing commas, single quotes, and comments will be flagged as errors.
Can I minify as well as pretty-print?
Yes - switch the mode to minify and the output collapses to a single line with no whitespace.
Where do parse errors point?
Errors include the line and column number plus a short description of what was expected, so you can jump straight to the problem.
Is JSON Formatter free?
Yes. Every tool on docsntools is 100% free with no signup, no watermarks, and no upload limits.
Are my files uploaded to a server?
No. All processing happens entirely in your browser. Your files never leave your device.
Does it work on mobile?
Yes - every tool is responsive and works in modern mobile browsers (Chrome, Safari, Firefox).