JSON formatter and validator
Pretty-print, validate and minify JSON with clear errors.
About the JSON Formatter tool
This JSON formatter pretty-prints, validates and minifies JSON in your browser. Paste JSON or open a .json file, choose 2 spaces, 4 spaces, tabs or Minify, and the result appears as you type. If the JSON is invalid, you get the exact line and column, such as "Invalid JSON at line 3, column 15", and the failing line is marked. Copy the result or download it as formatted.json. Nothing is uploaded, so API responses and config files stay private.
At a glance
- Formats
- Pretty with 2 spaces, 4 spaces or tabs, or minified
- Errors
- Line and column of the first error, marked in the line numbers
- Standard
- Strict JSON: no comments, trailing commas or single quotes
- Output
- Copy, or download as formatted.json
- Price
- Free, no sign-up
- Works in
- Your browser, on phone or computer. Works offline after the first visit.
- Privacy
- What you type never leaves your device.
How to format JSON
- Paste your JSON on the left, open a .json file or drop it on the box.
- Choose pretty printing with 2 spaces, 4 spaces or tabs, or Minify. The result appears on the right as you type.
- Copy or download formatted.json. If the JSON is invalid, the failing line is marked in the line numbers; press "Go to line" to jump to it.
Private
Your text stays in your browser and is never sent to a server.
Instant
Results update as you type, with nothing to install.
Free
No sign-up, no limits and no ads inside your writing space.
JSON Formatter: frequently asked questions
Is it safe to paste API responses or config files?
Yes. Formatting happens in your browser; nothing is uploaded or logged.
Why is my JSON invalid?
The usual causes are a trailing comma, single quotes instead of double quotes, keys without quotes, or comments. JSON allows none of these.
What is the difference between pretty and minified JSON?
Pretty JSON puts each value on its own indented line so people can read it; minified JSON removes every space and line break outside strings so it is smaller to send. For example, {"name": "Asha", "city": "Pune"} (32 characters) minifies to {"name":"Asha","city":"Pune"} (29 characters).
Is my text sent anywhere?
No. Everything runs in your browser and your text never leaves your device. Nothing is stored on any server.



