JSON Formatter & Validator
Format, minify and validate JSON without rounding large IDs.
Drop your file hereTap to choose a file
or click to browse, or paste from the clipboard
Values are never rewritten
The formatter moves whitespace and nothing else. Long integers, decimals, exponents, string escapes, key order and even repeated keys come out as they went in, because the text is never converted to JavaScript numbers or objects.
Errors with line and column
Validate checks strict JSON and stops at the first problem, such as a trailing comma, a missing quote or an unclosed bracket, and tells you the line and column where it is.
Collapsible tree
After Format or Minify, a document of up to 1,200 tokens gets an Explore JSON tree view in which every object and array can be opened or closed on its own.
How to format and validate JSON
- 1
Paste a JSON object, array or single value into the JSON input box.
- 2
Choose 2 or 4 spaces and select Format, or select Minify for a compact copy. Validate checks the syntax without producing output.
- 3
If an error is reported, go to the line and column it names, fix the text and try again.
- 4
Open Explore JSON tree to browse a small document, then copy the result or download document.json.
What people use this tool for
- Read a minified API response or webhook payload while debugging.
- Check a configuration file for a stray comma before deploying it.
- Minify a JSON fixture or request body to paste into a test or a command line.
- Inspect records that carry 64-bit IDs without the last digits changing.
Frequently Asked Questions
How do I format or pretty-print JSON?
Paste the JSON into the input box, choose 2 spaces or 4 spaces and select Format. The indented version appears in the Result box with one member per line. Select Copy result to put it on the clipboard or Download result to save it as document.json. Minify does the reverse and removes all whitespace outside strings.
Why is my JSON invalid?
The validator follows the JSON standard strictly. Common causes are a trailing comma after the last item, single quotes instead of double quotes, unquoted property names, comments, and values such as undefined or NaN. Text copied from a chat or a document can also carry curly quotes or non-breaking spaces. The message gives the line and column of the first problem.
Will formatting change my numbers or large IDs?
No. Many formatters parse JSON into JavaScript numbers, which silently turns 9007199254740993 into 9007199254740992 and 1.10 into 1.1. This tool keeps each number as the characters you pasted, so 64-bit IDs, long decimals, exponents and negative zero are unchanged.
Does it sort keys or repair broken JSON?
No. Members stay in their original order and duplicate keys are kept, since both can matter to the system that produced them. The tool does not guess at fixes either: it will not add missing quotes or remove trailing commas for you. It tells you where the problem is so you can correct it.
Can it check a JSON Schema, JSON5 or JSON Lines?
It validates syntax only, not whether fields match a JSON Schema. JSON5 features such as comments and unquoted keys are reported as errors. A JSON Lines file holds several documents, so paste one line at a time: anything after the first complete value is flagged as unexpected content.
What are the size limits?
Input can be up to 524,288 characters with at most 128 levels of nesting, and formatted output can be up to 4,194,304 characters. The tree view is offered for documents of up to 1,200 tokens, a count that includes every brace, bracket, comma, colon, key and value. Larger documents still format, minify and validate.
Is my JSON sent to a server?
No. Formatting, minifying and validation run in your browser, and the download is created on your device. API responses, tokens and configuration you paste here are not uploaded, and nothing is stored after you leave the page.
How do I compare two JSON documents or turn JSON into a spreadsheet?
Use JSON Diff to list the fields that were added, removed or changed between two versions, ignoring key order and formatting. Use JSON to CSV to turn an array of objects into CSV or Excel rows. Both also run in your browser.