JSON Formatter
Format and indent JSON, or minify it. Invalid JSON gets an error that points at the problem.
How to use this tool
- Paste or type your text into the box above.
- The result updates as you change the input — there is nothing to submit and nothing to wait for.
- Read the figures in the result panel, or copy the converted text.
- Use Copy or Download if you need the output elsewhere. Nothing was uploaded at any point.
When parsing fails, the tool reports the line and column, shows the surrounding text, and lists the usual culprits — a trailing comma, single quotes, or an unquoted key. That is faster than hunting through the browser console.
JSON Formatter — the specification
| Indent | 2 spaces, 4 spaces, tab, or minified |
|---|---|
| Validation | Reports line, column and context on failure |
| Stats | Type, key count, size before and after |
| Processing | Entirely in your browser |
How it works
This tool runs entirely in your browser. There is no server involved, which means nothing you type or upload is transmitted, stored, or logged — and there are no usage limits, because there is nothing for us to ration.
You can confirm it yourself: open your browser's developer tools, select the Network tab, and use the tool. No request is made.
A worked example
Run against this page’s own code, with the real input and the real output reproduced below.
What went in
{"exam":"SSC CGL","photo":{"min":20480,"max":51200,"format":"jpeg"},"signature":{"w":140,"h":60}}
What came back
| Valid JSONYesInput size | 97 |
|---|---|
| charsOutput size | 146 |
| items | 3 |
Everything above happened in the page as the text was typed. Nothing was sent to a server, which is why it works offline once the page has loaded and why there is no limit on how often you use it.
Who needs JSON Formatter
Reading an API response, tidying a configuration file, or minifying JSON before embedding it.
JSON Formatter — frequently asked questions
Why is my JSON invalid?
The most common causes are a trailing comma before a closing brace or bracket, single quotes instead of double quotes, unquoted keys, and unescaped newlines inside strings. The error message points at the exact position.
Is my data sent to a server?
No. Parsing uses your browser’s built-in JSON engine. Nothing is transmitted — which matters, because API responses often contain credentials or personal data.
What is the difference between JSON and JavaScript objects?
JSON requires double-quoted keys and strings, forbids trailing commas, comments, and values such as undefined or NaN. Valid JavaScript is frequently invalid JSON.
Does this work offline?
Yes. Once the page has loaded you can disconnect from the internet and it keeps working, because all the processing happens in your browser. That is also the simplest way to confirm nothing is being sent anywhere.
Is there a limit on how much I can paste in?
Nothing we impose. The practical limit is your device’s memory, since the work happens locally. Very large inputs get slower rather than being refused.
Can I use this on a phone?
Yes. The layout adapts to a small screen and everything works the same way.
Related tools
From other categories
Background reading: Text and Developer Tools That Never Upload Your Data
Your file never leaves your device. Open your browser's Network tab while you use this page and you will see no upload — how that works.
Disclaimer. Published requirements change without notice. Confirm against the official source before you submit. Full disclaimer.