Format, validate or minify JSON directly in your browser.
What this tool checks
The browser checks JSON syntax. Valid input is then formatted by changing whitespace outside strings, with two-space indentation or compact output. Number text, string escapes, object member order and duplicate member names are preserved.
This validates JSON syntax only; it does not validate a separate JSON Schema.
How to format JSON
Paste your JSON into the input box and select Format JSON. Valid data appears in the output box with two-space indentation, making nested objects and arrays easier to read. Select Minify to produce compact JSON, or Copy Output to copy the current result. Reset restores the sample. The input limit is 200,000 UTF-16 code units, with up to 256 nested arrays or objects. Formatted output is limited to 1,000,000 code units; if indentation exceeds that limit, try Minify. Editing the input clears the previous output and disables copying until you format again.
When this formatter is useful
Use readable formatting when reviewing an API response, checking a configuration file, or finding a misplaced comma. Minified output removes unnecessary formatting whitespace, which is useful when a compact representation is required. Neither option repairs invalid JSON automatically. Fix the reported syntax problem in the input, then run the tool again.
Example and common errors
A simple object is {"name":"Toolszzz","active":true}. Property names and string values need straight double quotation marks. Typographic quotation marks copied from a document are not valid substitutes. JSON also rejects comments, trailing commas, and single-quoted property names. Boolean values are written as lowercase true and false; an empty value can be represented by null.
Questions and limitations
Does valid JSON mean my data is correct?
No. This tool checks syntax using the browser’s JSON parser. It does not check required fields, business rules, or a JSON Schema. An object can be valid JSON and still be rejected by the application that receives it.
Will formatting preserve every detail?
Whitespace outside strings changes, but data tokens are retained exactly. For example, a large integer such as 9007199254740993, an exponent such as 1e400, and escaped string characters remain as entered. The parsed JavaScript value is used only to check syntax; it is not serialized into the result. This avoids the precision loss described in MDN’s JSON.parse documentation. Duplicate names remain in the output, but receiving applications may interpret them differently or discard earlier values. Preserve your original input and resolve duplicate names when interoperability matters.
Why does Copy Output do nothing after an error?
Invalid input clears the output so an old result is not mistaken for a new one. Correct the input and format it first. If clipboard access is unavailable, select and copy the output manually.
Find related utilities in Developer Tools, including the Base64 Encoder for encoding text.