JSON Formatter
Beautify, minify, validate JSON data and locate parse errors, with lenient comment mode support.
Format Settings
Usage
Features
The JSON Formatter helps you organize, minify and validate JSON data. It supports multiple indentation styles (2/4 spaces or Tab), a lenient comment mode, precise error location (line and column), file import/export and statistics — an essential tool for debugging APIs and config files.
Steps
- Paste or type JSON data into the input box, or click "Import" to load a .json file.
- Choose an indentation style (2 spaces / 4 spaces / Tab).
- Choose a parse mode: Strict (standard JSON) or Lenient (comments and trailing commas allowed).
- Click "Beautify" to format, "Minify" to compact into a single line, or "Validate" to check validity only.
- Copy or download the result as a .json file from the output area.
Notes
- Strict mode follows the RFC 8259 standard and does not allow comments or trailing commas.
- Lenient mode supports single-line // and multi-line /* */ comments as well as trailing commas.
- Invalid JSON will display an error message with position (line, column, character offset).
- All parsing runs locally in your browser; no data is uploaded to a server.