JSON formatter and validator
Paste your JSON to validate it, pretty-print it or minify it. If there is a syntax error, you will see exactly which line and column it is on.
Processed 100% in your browser
Output
Ctrl + Enter runCtrl + C copy result
How to use
- 1Paste or type your JSON into the input panel.
- 2Watch the validity indicator, which updates as you type.
- 3Choose the indentation and whether to sort keys alphabetically.
- 4Click “Format” or “Minify” and copy or download the result.
Use cases
- Read API responses that arrive on a single line.
- Find the comma or quote that breaks a configuration file.
- Minify JSON before sending or storing it to save space.
- Sort keys to compare two JSON documents with a clean diff.
Frequently asked questions
Is my JSON sent to a server?
No. Parsing and formatting happen in your browser with the native JSON engine; your data never leaves your device.
Why is my JSON invalid?
The most common errors are trailing commas, single quotes instead of double quotes, unquoted keys or comments, none of which the JSON standard allows.
What does “sort keys” do?
It sorts the keys of every object alphabetically at any depth, without changing the order of array items.