How to use the JSON Formatter
- Paste JSON into the input panel.
- Choose Format or Minify and your indentation.
- Copy or download the result. If the JSON is invalid, jump to the reported line to fix it.
Features
- Pretty-print with 2 spaces, 4 spaces or tabs
- Minify JSON for payloads and config files
- Exact error line and column for invalid JSON
- Optional recursive key sorting
- Size, depth and key-count statistics
Frequently asked questions
Is my JSON sent to a server?
No. Parsing and formatting use your browser's built-in JSON engine — no network requests are made.
Why is my JSON invalid?
The most common causes are trailing commas, single quotes instead of double quotes, unquoted keys, and comments. JSON allows none of these.