JSON Formatter & Validator
Paste JSON to check whether it is valid, make it readable with indentation, or shrink it to a single line. Parse errors point to the line and column where the problem was found.
Your input stays in your browser and is not sent to a server by this page.
What it is and when to use it
JSON (JavaScript Object Notation) is the text format most APIs, config files and databases use to exchange data. Use this tool when an API response is one unreadable line, when a request fails with a parse error, or when you want a compact version for a request body or environment variable.
How to use
- Paste your JSON into the input box.
- Choose an indent size, then select Format, Minify or Validate.
- Fix any error shown, using the reported line and column.
- Copy the result or download it as a .json file.
Example
{"id":1,"tags":["a","b"],"ok":true}{
"id": 1,
"tags": [
"a",
"b"
],
"ok": true
}Tips and common mistakes
- Keys and strings need double quotes. Single quotes, unquoted keys, comments and trailing commas are the most common causes of a parse error.
- Fix the first reported error, then validate again. One missing bracket can hide problems further down.
- Valid JSON is not the same as correct data. This tool checks syntax only, not whether fields match your API schema.
- Minify before embedding JSON in a URL, header or one-line config, and format it again when you need to read or review it.
Frequently asked questions
Is my JSON uploaded anywhere?
No. Parsing uses JSON.parse in your browser and the text is never sent to a server by this page.
Does it accept comments or trailing commas?
No. It follows strict JSON as implemented by your browser's JSON.parse, so comments, single quotes and trailing commas are reported as errors.
Can it change very large numbers?
Possibly. JSON.parse reads numbers as JavaScript doubles, so integers beyond 9007199254740991 can lose precision when reformatted. Keep such values as strings if exact digits matter.