JSON formatter and validator
Paste JSON to check it and make it readable. Format indents it with 2 or 4 spaces or tabs, Minify strips the whitespace, and any error is explained with its line and column.
Exactly what you wrote
Numbers, strings and escapes are kept as written: big integers keep every digit, 1.0 stays 1.0, and Unicode escapes are not rewritten.
Several JSON values
Paste objects one below the other, or JSON Lines (NDJSON): each value is formatted on its own. Minified, they go one per line and download as .jsonl. A comma between top-level values is pointed out, with a hint to wrap them in [ ].
Sort keys
Turn on Sort keys to order every object's keys alphabetically, which makes two versions easier to compare.
Keyboard shortcuts
- Format: Shift+Alt+F (⌥⇧F on a Mac)
- Minify: Shift+Alt+M (⌥⇧M on a Mac)
- Undo: Ctrl+Z (⌘Z on a Mac). Each Format or Minify is a step of its own.
- Find and replace: Ctrl+F (⌘F on a Mac)
Private: nothing is uploaded
Formatting, checking and comparing all happen in your browser. Your documents are saved in the browser's own storage on this computer, not on a server, so they never leave your device.
With your permission, we count anonymous visits (which pages and tools are used), never what you type. See Privacy.
Questions
How do I validate JSON?
Paste it in: it is checked as you type. If something is wrong, such as a missing comma or an unclosed bracket, the error is underlined and explained, with its line and column.
Can it minify JSON?
Yes. Minify removes all whitespace and shows how much smaller the result is; Format turns it back.
Is my data uploaded anywhere?
Your documents aren't: everything runs in your browser, and they are saved on your computer, in the browser's storage for this site. With your permission we count anonymous visits, never their content.
More tools
- Formatter & Converter for JSON, YAML, XML, SQL
- JSON Diff – Compare Two JSON Files Online
- JSON5 & JSON with Comments Formatter
- JSON Unescape – Read Stringified JSON
- JSON Escape – Turn Text into a JSON String
- JSON to YAML Converter
- YAML to JSON Converter
- JSON to TOML Converter
- TOML to JSON Converter
- Online Diagram & Flowchart Editor
- UUID, Password, Hash & Secret Key Generators