JSON Formatter
JSON Formatter and Validator
Paste JSON to check whether it is valid, then pretty-print it or minify it to one line. If there is a syntax error, the tool shows the line and column and explains what is wrong. Your data never leaves this page.
- Numbers and strings are output exactly as written, so long numbers are not rounded.
- JSON5 and JSON with comments are not supported. Comments and trailing commas are reported as errors.
- Everything is processed in your browser. Nothing you paste is sent or saved.
About this tool
Paste JSON to check whether it is valid, then pretty-print it or minify it to one line. When there is a syntax error, the tool shows the line and column and explains the cause, such as a missing comma, a trailing comma or single quotes. Choose 2 spaces, 4 spaces or tabs for indentation and optionally sort keys. Your JSON is processed in your browser and never sent to a server.
How to use
- Paste JSON into the JSON box on the left, or click Sample to try it.
- Below the box you will see Valid JSON, or the line, column and cause of the error, with the problem character marked.
- Choose the Indent and whether to sort keys, then click Format or Minify.
- Copy the Result on the right, or click Download to save it as a .json file.
Useful for
- Reading API responses in a readable layout
- Finding mistakes in configuration files such as package.json
- Checking structured data (JSON-LD) before publishing
- Minifying data to make it smaller
FAQ
What does formatting JSON do?
It adds line breaks and indentation so the structure is easy to read. The data itself does not change.
How do I find where a JSON error is?
The tool shows the line and column of the error, displays that line with the problem character marked, and explains what is wrong in plain words.
Does it support JSON with comments or JSON5?
No. Comments and trailing commas are reported as errors.
Is my data sent anywhere?
No. Everything is processed in your browser and nothing is saved.
Updates to this tool
All updatesReleased 17 new tools, including SSL, DNS and IP checks, JSON-LD, llms.txt and favicon generators, a tax calculator and a Japanese era converter
Other free tools
All 183 free tools- Encoder and DecoderConvert URL encoding, Base64, HTML entities and Unicode escapes both ways.
- Hash and UUID GeneratorCalculate MD5 and SHA hashes of text or files, verify checksums and generate UUID v4 in bulk.
- Regex TesterTest JavaScript regular expressions with highlighted matches, groups and a replacement preview.
- Unix Timestamp ConverterConvert Unix timestamps (seconds or milliseconds) to and from dates in Japan time, UTC and ISO 8601.
- CSV to JSON / JSON to CSV ConverterConvert CSV to JSON and JSON to CSV with quoted values, table preview and Excel-ready download.
- Color Code Converter (HEX, RGB, HSL, CMYK)Convert colors between HEX, RGB, HSL, HSV and CMYK, find the nearest color name and copy CSS.
- Markdown Preview and Markdown to HTML ConverterWrite Markdown with a live preview and copy the converted HTML. Tables and task lists supported.
- JWT DecoderDecode a JWT to view its header and payload, with exp and iat converted to dates.