Beautify, minify, validate
Beautify re-indents JSON so structure is readable. Minify removes every byte of optional whitespace for transport. Validate parses without rewriting, so you can check a document and keep the exact text you have.
All three run the same strict parser, so a document that beautifies is a document that parses.
How to use it
- Paste JSON into the input pane, or press Sample.
- Pick a mode and an indentation width.
- Results update as you type below 256 KB; larger documents process when you press Run or Ctrl/Cmd + Enter.
- If parsing fails, use the Go to line button in the status bar to jump straight to the problem.
Your values are never rewritten
Many formatters run your document through a parse-and-restringify cycle, which quietly changes data. Codoryn keeps every number and string exactly as you wrote it.
A round trip through JSON.parse and JSON.stringify turns 12345678901234567890 into 12345678901234567000, collapses 1.50 to 1.5, and converts 1e999 to null. This formatter changes whitespace only, so large identifiers, fixed-precision decimals and escape sequences such as \u00e9 survive untouched.
Array order is never changed. Sort object keys reorders object members only, recursively, and only when you switch it on; re-running with it off restores your original order.
Reading parse errors
Errors report a line and column and a description of what was expected. Common causes:
- Trailing commas.
{"a": 1,}is valid JavaScript and invalid JSON. - Single quotes. JSON strings and keys require double quotes.
- Unquoted keys.
{a: 1}is an object literal, not JSON. - Comments. JSON has none;
//and/* */are errors. - NaN, Infinity, undefined. Not JSON values.
- Literal newlines inside strings. They must be escaped as
\n.
This version does not repair JSON. It tells you precisely what is wrong and where, and leaves the fix to you.
Duplicate keys
JSON does not forbid an object from repeating a key, but parsers disagree about what it means. Most take the last value; some take the first; some reject the document.
Codoryn keeps both entries exactly as written and reports the duplicate in the status bar so you can decide. It does not silently drop one, because that would change your data based on a convention your consumer might not share.
Frequently asked questions
Is my JSON uploaded?
No. Processing normally runs in a Web Worker inside your browser. If worker execution is unavailable, the badge above the workbench says so, and only small documents are processed on the main thread — larger ones are refused rather than freezing the page. Either way the document is processed in your browser, and this tool does not send it over the network.
How large a document can I paste?
Up to 20 MB. Below 256 KB it processes as you type; above that you run it explicitly so a large paste never causes work on every keystroke.
Does Validate change my document?
No. It parses and reports, and leaves your text alone.
Why did my emoji turn into \ud83d\ude80?
It did not — that is how it was written in your input, and the formatter preserves escapes verbatim. Literal emoji stay literal.