Paste messy JSON and get clean, readable output in one click, or shrink it to a single line for sending. Invalid JSON gets a clear error with the line and position where parsing stopped, so you can fix it fast.
JSON Formatter & Validator
Format, minify and validate JSON free, with line-numbered output and precise error locations.
JSON Formatter & Validator
Format, minify, and validate JSON in your browser. Nothing you paste leaves this page.
Input: 0 characters, 0 lines.
Output
No output yet. Format, minify, or validate to see results.
Validation uses your browser's built-in JSON parser, so what passes here follows strict JSON: double quotes, no trailing commas, no comments, no single-quoted strings. This tool does not do JSON Schema validation. Formatting rewrites numbers the way JSON.stringify does (for example 1.0 becomes 1, and integers longer than about 16 digits may lose precision) — it never repairs broken JSON, it reports the error instead. Inputs over 1 MB show a size warning; inputs over 10 MB are refused so the page does not freeze. Very deeply nested input may fail with a stack error in the browser; that is reported as an error, not a crash.
How to use
- Paste or type your JSON.
- Choose indentation: 2 spaces, 4 spaces or tabs.
- Click Format to beautify, Minify to compress, or Validate to check only.
- Copy the result or download it as a .json file.