JSON Formatter & Validator
Format, beautify and validate JSON with proper indentation and instant error messages. Paste minified JSON and get clean, readable output.
What formatting changes besides whitespace
The formatter reads the whole document into memory and prints it again with two-space indentation. Because it rebuilds the document rather than re-indenting text, a few details can change:
- Numbers are written in their shortest form.
1.50becomes 1.5,1e3becomes 1000,1.0E-7becomes 1e-7, and-0becomes 0. - Escapes are resolved.
\u00e9is shown as é and\/as a plain /. Quotes, backslashes and control characters keep their escapes. - Duplicate keys collapse silently.
{"a":1,"a":2}comes out with only"a": 2, with no warning that the first value was dropped.
Large IDs lose precision
Numbers are read as standard double-precision values, so integers beyond 9007199254740991 are rounded:
The output looks valid, which makes this easy to miss. Order numbers and database keys of 16 digits or more are the usual victims. If you need to keep such values exactly, they should be sent as strings. Don't copy formatted output back into a system as the source of truth for those fields.
Key order can shift
Keys normally stay in the order you wrote them, with one exception. Keys that look like whole numbers move to the front in ascending order:
The data is the same, since JSON objects have no defined order, but a diff against the original will show moved lines. Keep that in mind when you format two versions of a file to compare them.
What it accepts as one document
Any single JSON value works, including a bare string or number such as 42. Two values one after the other do not, so JSON Lines files and log extracts with one object per line fail with an error. Format those one line at a time.
Error messages come from your browser's own JSON parser, so the wording differs between browsers. Most include a position or a line and column that points close to the problem. For the reverse job, stripping the whitespace back out, use the JSON Minifier.
Frequently asked questions
Can I change the indentation to four spaces or tabs?+
No. Indentation is fixed at two spaces for each nesting level. Most code editors can re-indent the result if your project uses a different style.
Does formatting change my data?+
The values stay equal in meaning, with two exceptions to watch for: very large integers get rounded and duplicate keys are reduced to the last one. Everything else is a change of layout or notation.
Is my JSON uploaded to a server?+
No. Parsing and formatting run in your browser, so API responses and configuration files with secrets stay on your device.
Guides & deep dives
Common JSON Errors and How to Fix Them
Trailing commas, single quotes, unquoted keys, BOM, NaN — learn what breaks JSON and how to fix each error fast with a free online formatter.
Schema Markup for Beginners: Types That Win Rich Results
Learn how to add schema markup to your site with real JSON-LD examples for FAQ, Article, Product, and LocalBusiness — and avoid the errors that kill rich results.
Base64 Explained: What It Is and When to Use It
Learn what Base64 encoding is, why it adds 33% overhead, how data URIs work, the base64url variant, and exactly when to encode or decode — with worked examples.
CSV to JSON: Handling Headers, Quotes and Nested Data
Master CSV to JSON conversion: RFC 4180 quoting rules, delimiter problems, type inference, and flattening nested JSON back to CSV — with worked examples.
Embed this tool on your website
Free to use on blogs, school sites and intranets. Paste this code into your page's HTML; please keep the credit line.
<iframe src="https://utilityapp.lat/embed/convert/json-formatter" title="JSON Formatter & Validator" width="100%" height="600" style="border:0;max-width:760px" loading="lazy"></iframe> <p style="font-size:13px"><a href="https://utilityapp.lat/convert/json-formatter">JSON Formatter & Validator</a> by UtilityApp</p>