JSON Formatter & Validator
Paste JSON to check that it is valid, make it easy to read, or shrink it into one line. If the JSON is broken, the tool points to the line and column where parsing failed.
How to use it
- Paste or type your JSON in the input box.
- Choose an indent size, and tick "Sort keys" if you want keys in alphabetical order.
- Press Format to pretty-print it, or Minify to remove all extra spaces.
- Copy the result with the Copy button.
Limitations
- Only strict JSON is accepted. Comments, trailing commas and single quotes are errors.
- Very large inputs (many megabytes) can make the page slow because everything runs in your browser.
- Numbers larger than 9,007,199,254,740,991 lose precision when parsed by JavaScript.
Frequently asked questions
Is my JSON uploaded to a server?
No. Parsing and formatting happen in your browser tab.
Why does it say my JSON is invalid?
Common causes are single quotes, trailing commas, unquoted keys and missing brackets. The error message shows the position.
What does "Sort keys" do?
It sorts object keys alphabetically at every level. Array order is never changed.
Related tools