JSON Formatter & Validator
Format, validate, and minify JSON in your browser. Precise error messages with position, nothing uploaded.
Private by construction. The conversion happens in this page's JavaScript. Nothing you paste here leaves your machine, and the tool keeps working with the network unplugged.
Paste JSON and get it pretty-printed with two-space indentation, or minified to a single line for embedding. Validation is the byproduct: anything that formats is valid JSON, and anything that is not fails with the browser engine's own error message, which names the offending position. The strictness is the point — trailing commas, single quotes, and comments are not JSON, and this tool will tell you so instead of silently accepting them.
Questions this tool gets asked
Is this also a JSON validator?
Yes. Formatting only succeeds on valid JSON, so a successful format is a validation pass. Invalid input produces the JavaScript engine's error message, which includes the position of the first problem.
Why does my JSON with comments fail?
Comments are not part of the JSON standard. Files that allow them (like some config formats) are JSON5 or JSONC, which are different formats. Remove the comments and strict JSON parsers everywhere will accept the file.
Is my JSON uploaded anywhere?
No. Parsing and formatting run in this page's JavaScript. Disconnect from the internet after loading and the tool keeps working.