JSON Formatter
Make JSON readable with consistent indentation. Validate, minify, copy, or download it without uploading your data.
How to use it
- Paste JSON or open a local JSON file.
- Choose two spaces, four spaces, or tabs, then select Format JSON.
- Copy the result or download formatted.json. Use Minify JSON for compact output.
Formatting without changing values
Only whitespace outside strings changes. Number spellings, large integers, key order, duplicate keys, and escape sequences are preserved. Formatting does not sort keys or repair invalid JSON.
JSON requires double quotes. Comments, trailing commas, undefined, NaN, and Infinity are not valid JSON. Error positions count from 1; columns use UTF-16 text positions. Very large numbers may exceed the range supported by other software.
Formatted output is limited to 16 MiB. For deeply nested input, use fewer spaces or minify.