{ }
JSON Formatter
Format, validate and inspect the structure of JSON — all in your browser, nothing sent to a server.
Input
1
Output
This tool runs entirely in your browser; the data you enter is never sent to a server.
ABOUT
What does a JSON formatter and validator do for you?
API responses and log lines usually arrive as one long line with no indentation. This tool re-indents them (2 spaces, 4 spaces or tabs), points at the exact line and column when the JSON is invalid, and can sort keys or minify the output. A tree view helps with large nested structures. Everything runs in your browser, so it is safe to paste responses that contain tokens.
HOW TO
How to use it
- Paste JSON into the input pane or load a
.jsonfile. - If something is wrong you get the error with its line number — use the jump button to go straight there.
- Pick an indent and copy or download the result; use minify before sending it in an HTTP request.
FAQ
Frequently asked questions
Why is my JSON invalid when it works in JavaScript?
JSON is stricter than a JavaScript object literal: keys need double quotes, trailing commas and comments are not allowed, and
undefined does not exist.Is my data sent to a server?
No. Parsing happens in JavaScript inside your browser and the input never leaves your device.
What is the difference between format and minify?
Format adds whitespace for readability; minify removes every unnecessary byte of whitespace to make the payload smaller.