JSON Formatter & Validator
Paste JSON to pretty-print it, find syntax errors by line and column, or minify it. It runs in your browser.
Input JSON
Formatted
How to use it
- 1Paste JSON into the left box, open a .json file, or click Sample.
- 2Pick Format or Minify, the indent size, and whether to sort keys.
- 3Fix any error shown under the input; the line and column point at the problem.
- 4Copy or download the result from the right box.
Private by design
Everything runs in this browser tab. Your input is never uploaded, logged or saved on a server, and there are no public "recent" pages. Close the tab and it's gone.
How we keep it privateExamples
Input
{"user":{"id":7,"tags":["a","b"]},"ok":true}Output
{
"user": {
"id": 7,
"tags": [
"a",
"b"
]
},
"ok": true
}The error points at the start of the line after the missing comma.
Input
{
"name": "api"
"port": 8080
}Output
Line 3, column 3: Expected "," or "}" but found """
Common JSON errors and how to fix them
Most invalid JSON comes from JavaScript habits. The validator names each of these directly:
- Single quotes: JSON strings and keys need double quotes ("name", not 'name').
- Trailing commas: [1, 2,] and {"a": 1,} are valid JavaScript but not JSON.
- Comments: // and /* */ are not allowed in JSON. Remove them or use JSONC/JSON5 tooling.
- Python values: True, False and None must be true, false and null.
- Unquoted keys: {name: 1} must be {"name": 1}.
Frequently asked questions
Is my JSON sent to a server?
No. Parsing and formatting run in your browser (large inputs in a background Web Worker). Nothing is uploaded, logged or stored, so API responses with tokens or customer data stay on your machine.
Why do my big numbers stay exact here?
Many formatters use JSON.parse, which turns 12345678901234567890 into 12345678901234567000. This tool keeps every number exactly as written, so 64-bit IDs and prices with trailing zeros are not changed.
How large a file can I format?
Up to 10 MB of text works well in a modern browser. The work runs off the main thread, so the page stays responsive.
Does "Sort keys" change my data?
Only the order of object keys, which JSON treats as meaningless. Array order is never changed.