JSON Formatter & Validator
Pretty-print JSON or minify it to one line, sort keys alphabetically, validate it with the exact line, column and cause of any error, or escape and unescape JSON strings.
Free, no sign-up
Your data stays on your device
Works offline after first open
The tool
Loading the tool…
How to use
- Paste JSON or drop a .json file.
- Choose: format, minify, validate, escape text or unescape.
- If there is an error we show its line, column and likely cause.
- Copy or download the result.
Privacy & how it works
Processes your data in the browser and stores nothing.
- Engine: lightweight in-page code, no external libraries.
- Works offline after you open it once.
Frequently asked questions
What are the most common JSON errors?
A trailing comma before } or ], single quotes instead of double, unquoted keys, and comments. We catch all of them and tell you where.
Does sorting keys change the data?
No. Key order does not change an object’s meaning. Arrays keep their order.
What does escaping text mean?
Turning plain text into something that fits inside "…" in JSON: quotes become \" and new lines \n. Unescape does the reverse.
Do very large numbers change?
Integers larger than 9007199254740991 lose precision in JavaScript when formatted. Keep numbers that big as strings.
Related tools
JSON Viewer & JSONPath QueryBrowse JSON as a collapsible tree, search keys and values, and pull out what you need with a JSONPath query like $.items[?(@.price > 10)].name, copying any path or value.JSON DiffCompare two JSON files by structure, not text: see every key that was added, removed or changed with its full path, ignoring key order and whitespace, with an option to ignore array order.JSON to CSVTurn JSON or JSON Lines into a CSV table: we pick the array for you, flatten nested objects into columns like address.city, and download a file that opens in Excel with correct Arabic.YAML ↔ JSON ConverterConvert YAML to JSON or JSON to YAML, validate a YAML file with the line number of any error, or reformat it with clean indentation. Multiple documents (---) are supported.