What this tool does
Beautify nested objects, minify payloads, and validate JSON with selected inputs processed locally in your browser.
Privacy behavior
Selected inputs are processed locally in your browser for this workflow. The public site may load ads and analytics; use the privacy build for privacy-sensitive workflows.
Supported workflow
Use the controls on this page, review the output in your browser, then copy or download the result.
When should you format JSON?
Formatted JSON is easier to inspect, debug, review, and share with teammates. Minified JSON is useful when you need compact payloads for APIs, examples, or configuration files.
This tool validates strict JSON. It does not repair invalid JSON or accept JavaScript-style comments, trailing commas, or unquoted keys.
JSON grammar and what this tool enforces
JSON, defined in RFC 8259, allows exactly six value types: object, array, string, number, boolean, and null. An object is an unordered set of string-keyed pairs in curly braces; an array is an ordered list in square brackets. Strings must use double quotes, never single quotes, and support backslash escapes such as \n, \t, and \uXXXX for arbitrary code points. Numbers follow a strict grammar: an optional minus sign, an integer part with no leading zeros other than a bare 0, an optional fractional part, and an optional exponent; JSON has no literal for NaN, Infinity, or hexadecimal numbers, even though JavaScript itself accepts all three.
This tool parses input with the browser native JSON.parse(), so it enforces that grammar exactly as strictly as any production JSON parser would. Comments, trailing commas after the last array or object item, unquoted object keys, and single-quoted strings are all rejected, since none of them are part of the JSON grammar even though relaxed supersets such as JSON5 or JSONC allow them.
| JSON type | Allowed form | Example | Parsed JavaScript type |
| Object | Double-quoted string keys only | {"a":1} | Object |
| Array | Ordered, comma-separated, no trailing comma | [1,2,3] | Array |
| String | Double-quoted, backslash escapes | "line\n" | string |
| Number | No leading zeros, no NaN, no hex, no leading plus | -3.14e2 | number, IEEE 754 double |
| Boolean | Lowercase true or false only | true | boolean |
| Null | Lowercase null only | null | null |
Worked examples
Formatting {"a":1,"b":[1,2,3],"c":{"d":true,"e":null}} with 2-space indentation produces:
{
"a": 1,
"b": [
1,
2,
3
],
"c": {
"d": true,
"e": null
}
}
Minify reverses this back to the original single-line form. A malformed input such as {"a":1,}, with a trailing comma, fails validation with a message similar to Expected double-quoted property name in JSON at position 7 in Chromium-based browsers; this tool adds its own computed line and column after that message when the browser text includes a numeric position.
Frequently Asked Questions
Is this JSON Formatter free?
Yes. You can format, validate, minify, copy, and download JSON without signup.
Is my JSON uploaded?
No. Parsing and formatting run locally in your browser.
Does it support Unicode and emojis?
Yes. JSON.parse and JSON.stringify preserve valid Unicode strings and emojis.
Can it fix invalid JSON?
No. It validates strict JSON and shows an error so you can fix the source manually.
What indentation should I use?
Two spaces are common for web projects, four spaces are easier to read, and tabs are useful when your project requires them.
Why did a large ID number change after formatting?
JSON numbers are parsed as JavaScript double-precision floats, which cannot exactly represent integers above 9007199254740991. A 64-bit style ID beyond that range is silently rounded; store or transmit such IDs as strings if exact precision matters.
Why are my object keys reordered after formatting?
JavaScript places keys that look like array indices, such as "2" or "10", in ascending numeric order ahead of other string keys. This reordering happens for any JSON.parse and JSON.stringify round trip, not specifically because of this tool.
Why does an error message not show a line and column?
This tool adds line and column numbers only when the browser own JSON.parse error text includes the word position and a number. Some browser engines phrase parse errors differently, so you may see only that engine native message instead.
Privacy Policy
ConvertUnlimited does not provide a server-side upload endpoint for this JSON formatting flow. JSON input and selected files are processed locally in your browser.
Terms of Use
ConvertUnlimited is provided as is. Always review formatted JSON before using it in production systems.
Trust and privacy
Files are processed locally where supported. Review the Trust Center for the processing model and the Privacy Policy for public-site privacy boundaries.