JSON Formatter & Validator
Paste JSON to validate it instantly, pretty-print or minify it, sort keys, and see exactly where any syntax error is.
How to format and validate JSON
- Paste your JSON into the left box. It is validated as you type.
- If it is valid you get a formatted copy; if not, the status bar shows the line and column of the first error.
- Choose the indentation, tick Sort keys if you like, then copy or download the result. Pick Minified to remove all whitespace.
Features
Instant validation
Errors reported with line and column numbers.
Beautify or minify
2 spaces, 4 spaces, tabs or fully compact.
Sort keys
Alphabetise object keys for clean diffs.
Private
Conversion runs in your browser; nothing is uploaded.
Frequently asked questions
What are the most common JSON errors?
Trailing commas after the last item, single quotes instead of double quotes, unquoted property names, missing commas between items and comments, none of which JSON allows. The error message points to where parsing stopped.
What is the difference between formatting and minifying?
Formatting adds line breaks and indentation so people can read it. Minifying removes all unnecessary whitespace to make the file as small as possible for transmission.
Does sorting keys change my data?
It reorders properties within every object alphabetically. Values and array order are untouched, and JSON objects are unordered by definition, so meaning is preserved.
Is my JSON sent anywhere?
No. Parsing and formatting happen in your browser, so API keys, personal data and private payloads stay on your device.