JSON Formatter & Validator
Paste JSON and it is validated and formatted as you type. Explore it as a tree, minify it, or find exactly where it breaks.
- Runs in your browser
- Nothing uploaded
- Up to 5 MiB
- Big numbers kept exact
The formatted result appears here as you type.
What it checks
The checker follows the JSON standard (RFC 8259) strictly. Trailing commas, single quotes, comments, unquoted keys, leading zeros and values such as NaN are reported with a plain-English explanation and the exact line and column. Duplicate keys are valid syntax but usually a bug, so they are flagged as warnings.
Sorting keys
Sorting reorders object keys alphabetically at every level, which makes two documents easier to compare. Array order is never changed.
Large numbers stay exact
Most online formatters run your input through JSON.parse, which silently rounds integers larger than 9007199254740991, so a 19-digit ID comes back changed. This formatter keeps every number exactly as written and tells you when such numbers are present.
Privacy
Formatting happens on your device. Nothing you paste is uploaded, stored or logged.
Features
- Validates and formats as you type
- Code view with line numbers and syntax highlighting
- Collapsible tree view with item counts
- Plain-English errors with line, column and Go to error
- Big integers kept exact instead of rounded
- Duplicate keys flagged
- Sort keys, minify, escape and unescape
- Open or drop a file, copy or download the result
- Up to 5 MiB, processed locally
Frequently asked questions
Is my JSON uploaded anywhere?
No. Formatting and validation run in your browser with its built-in JSON parser. Nothing you paste is sent to a server, stored or logged.
Why is my JSON invalid?
The most common causes are a trailing comma after the last item, single quotes instead of double quotes, unquoted keys and comments. JSON allows none of these. The error shows the line and column where parsing stopped.
Does sorting keys change my data?
No values change. Object keys are reordered alphabetically at every level; array order is kept as it is.
Will my large numbers change?
Not here. Many formatters use JSON.parse, which rounds integers above 9007199254740991. This formatter keeps every number exactly as written and warns you when such numbers are present, because other JavaScript code may still round them.