About the JSON Formatter
The JSON formatter validates JSON text and converts it into readable indented output or compact minified output. Processing stays in this browser tab, making it suitable for data that should not be submitted to an online backend.
How to use this tool
Paste or type a JSON document in the input area. Select Format JSON to parse the value and print it with consistent indentation, or Minify to remove unnecessary whitespace. A parsing error means the input is not valid JSON; use the reported position and nearby syntax to find missing quotes, commas, braces, or brackets. Clear removes the current input and output from the interface.
How to read the result
Successful formatting preserves JSON data types and structure while changing whitespace. Objects contain string keys and values; arrays preserve order; strings require double quotes; and the only literal values are true, false, and null. JSON does not allow comments, trailing commas, unquoted keys, NaN, Infinity, or undefined. Minified output is semantically equivalent but smaller, which can be useful for transport or compact storage.
Limits and privacy
The formatter uses the browser's native JSON parser and does not apply a schema, sort object keys, repair invalid input, or guarantee that another application accepts the resulting structure. JavaScript number parsing can lose precision for integers beyond the safe-number range. Very large documents may consume significant memory or make the tab slow. Input and formatted output are processed locally and are not sent to buffer.lol.
Common questions
- Does formatting JSON change its data?
- It changes whitespace only. Parsing and re-serializing preserves standard JSON values, although extremely large numbers are subject to JavaScript number precision.
- Why is valid JavaScript object syntax rejected?
- JSON is stricter than JavaScript: keys and strings require double quotes, and comments, trailing commas, undefined, and other JavaScript values are not allowed.