Overview
Paste JSON on the left; the formatted version appears on the right and everything that does not match the chosen standard is listed underneath. Nothing is uploaded — the parser, the validator and the printer all run in your browser.
The parser is deliberately forgiving. It reads the widest superset of JSON it can, notes every deviation with its position, and recovers from structural damage, so you get a formatted result and a list of problems rather than a single "unexpected token" message.
Standards
The Standard setting only changes how findings are judged — the input is parsed the same way either way. So one paste answers "is this valid JSON5?" and "is this valid I-JSON?" without retyping anything.
What each standard allows
✓ allowed · ! allowed but risky · ✗ not allowed
Comments
- JSON has no comment syntax, but they turn up constantly — in config files, and in JSON written by language models to annotate what a field means.
- Keep in place parses comments as part of the document and writes them back against the same member: a comment on its own line stays on its own line above that member, and a comment at the end of a line stays at the end of that line. They travel with their member even when you sort the keys.
- A comment between a key and its value is moved above the member if it is a
// comment, because leaving it there would comment out the value.
- A
// comment that wrapped onto the next line without a second // is recognised and kept as a comment, instead of the leftover prose being turned into members. It is only done when the line cannot be JSON under any reading — no braces, brackets, colons or commas, and at least one bare word — so a genuinely missing comma is still repaired as a missing comma. The continuation is written back as its own // line, keeping your line breaks, and reported so you can tidy it up at source.
- Keeping comments means the output is JSONC or JSON5 rather than strict JSON. The status line says so, and it is not counted as a failure.
- Strip out removes them. Treat as an error reports them as errors whatever the standard says.
- Comments cannot survive Compact or NDJSON output — there is nowhere for them to live on a single line — so they are dropped and you are told how many.
Repair
- With Repair issues on, every token is rewritten as strict JSON: single and typographic quotes become double quotes, bare keys get quoted,
True / False / None / undefined become true / false / null, hexadecimal and +1 / .5 / 5. / 007 numbers are normalised, raw tabs and newlines inside strings are escaped, and stray backslashes are fixed.
- With it off you get a pure re-indent: tokens are emitted exactly as written, so a JSON5 document stays JSON5 and nothing is quietly reinterpreted.
- Structural repairs happen either way, because the output is rebuilt from the parsed document: missing commas and colons, missing closing brackets, doubled commas and trailing commas are all resolved. Each one is still reported so you can check the guess.
- Wrappers are removed automatically: a UTF-8 BOM, a
)]}' anti-hijacking prefix, or a JSONP callback(…) wrapper.
- Some things cannot be repaired safely and are reported instead — a number with no digits after its exponent, or a lone surrogate whose other half is gone.
Numbers
- Keep numbers exactly as written (on by default) prints the digits you supplied. Without it, numbers go through a JavaScript double:
12345678901234567890 comes back as 12345678901234567000 and 1.5E+10 becomes 15000000000.
- Numbers that a double cannot hold are flagged. RFC 8259 §6 treats that as an interoperability risk; I-JSON makes it an error. Large identifiers are usually better sent as strings.
Other options
- Sort keys orders every object, at every level, alphabetically — with numeric awareness, so
item2 comes before item10. Useful for diffing two documents that only differ in key order.
- Duplicate keys decides what to do when a name appears twice in one object. Reporting only leaves the document alone; keeping the last matches what
JSON.parse does.
- Collapse short containers keeps small arrays and objects on one line if they fit within the width you set — much easier to read for arrays of numbers.
- Escape non-ASCII writes every character above ASCII as
\uXXXX, for pipelines that are not reliably UTF-8. Emoji and other astral characters become correct surrogate pairs.
- NDJSON output writes one compact record per line. If the input is a single array, its elements become the records; if the input is already a stream of documents, they are kept as they are. Wrap multiple documents in an array does the reverse.
Working with the results
- Click any issue in the list to select it in the input box; the line is highlighted in the gutter. Click the arrow on the right of an issue for the detail and what the standards say about it.
- The chips above the list filter by severity.
- The status line also re-validates the output, so you can see whether the result is clean, not just what the input was.
- Unwrap string lights up when the whole input is a quoted string that itself contains JSON — the usual shape of a log field or an API envelope. As string does the reverse for embedding.
- Use as input moves the output back to the left so you can chain operations.
- Drop a file anywhere on the page to load it. Ctrl/Cmd+Enter formats.
Related
To explore a large document as a collapsible tree, search it, or infer a schema, use the JSON Explorer.