JSON Formatter & Validator
Format, minify and validate JSON. Errors point to the exact position.
Loading…
Runs entirely in your browser. Nothing you enter is uploaded or stored on a server.
About this tool
JSON is the format almost every API, config file and log uses — and it is almost always delivered as one unreadable line. This formatter indents it so you can read it, minifies it when you need it small, and tells you exactly where it breaks when it is invalid. Because it runs locally, it is safe to paste production responses that contain tokens or customer data.
How to use
- 1Paste your JSON into the input box.
- 2Choose Format to pretty-print it, or Minify to strip all whitespace.
- 3Pick 2 spaces, 4 spaces or tabs for indentation.
- 4If the JSON is invalid, read the error position, fix it, and the output updates instantly.
When you need it
- Reading a minified API response while debugging.
- Finding the missing comma or bracket that breaks a config file.
- Shrinking JSON before storing it or sending it in a request.
- Normalising indentation before committing a JSON file to Git.
Frequently asked questions
Why does my JSON fail validation when it looks fine?
The most common causes are a trailing comma after the last item, single quotes instead of double quotes, unquoted property names, or comments. All of these are allowed in JavaScript but not in JSON.
Is it safe to paste API responses containing tokens?
Yes. Formatting happens entirely in your browser and nothing is sent to a server. You can verify this by disconnecting from the internet — the tool keeps working.
Does formatting change my data?
No. Only whitespace changes. Keys, values and their order stay exactly as they were.
Related tools
- Base64 Encoder / DecoderConvert text to Base64 and back. Handles Arabic and any Unicode text correctly.
- URL Encoder / DecoderPercent-encode and decode URLs, and split a query string into readable lines.
- HTML Entities Encoder / DecoderConvert & to & and back. Optionally escape every non-ASCII character.
- Unicode Escape / UnescapeTurn Arabic and any Unicode text into \u escapes and back. Essential for JSON and source files.
- JWT DecoderDecode a JSON Web Token and read its header, payload and expiry.
- UUID GeneratorGenerate UUID v4 and v7 identifiers, one at a time or in bulk.