How to use
Paste JSON into the input pane, or click “Open file” to load a .json file (drag & drop works too).
Choose a mode: Format, Minify, Tree view or String escape. The result updates as you type.
Adjust indentation, key sorting or non-ASCII escaping if needed.
If there is an error, check the reported line and column, use “Go to error” to jump there, and try “Auto-repair and retry” if appropriate.
Copy the result or download it as a file.
What it does
Lossless number handling
Tools built on JSON.parse round integers above 9,007,199,254,740,991 (2^53 − 1) and long decimals. Our own parser keeps every number exactly as written, so order IDs and other large values never change.
Precise error reporting
Syntax errors show the line, column, what was expected and what was found, with a marked excerpt. “Go to error” selects the exact spot in the editor.
Auto-repair for JSONC / JSON5-style input
Converts comments, trailing commas, single quotes, unquoted keys and NaN/Infinity into valid JSON — and lists every repair it made.
Tree view with path copy
Explore large documents in a collapsible tree and copy the JSONPath of any value (e.g. $.items[0].sku) in one click.
Duplicate key detection
Flags repeated keys, which JSON technically allows but which often cause subtle bugs.
Stays responsive with big files
Processing runs in a background Web Worker, so multi-megabyte JSON does not freeze the page.
Use cases
- Make an API response or config file readable
- Find the exact cause of an “Unexpected token” error
- Turn JavaScript objects or commented JSONC into valid JSON
- Format JSON containing 64-bit IDs without losing digits
- Embed text with line breaks and quotes as a JSON string
Supported formats
Input
Output
Capability matrix
| Feature | Support | Notes |
|---|---|---|
| Format & minify (2 / 4 spaces, tab) | Supported | — |
| Syntax validation with line/column | Supported | — |
| Exact large numbers (integers above 2^53, long decimals) | Supported | Output exactly as written |
| Auto-repair comments, trailing commas, etc. | Supported | Repairs are listed |
| Sort keys alphabetically | Supported | Applied to nested objects |
| Tree view & JSONPath copy | Supported | — |
| Duplicate key detection | Supported | — |
| JSON Schema validation | Not supported | Syntax only |
| JSON Lines (one JSON per line) | Not supported | Treated as one document; extra lines are errors |
| Offline use | Supported | Works without a connection once loaded |
Limits & notes
- Files up to 50 MB can be loaded. Above one million characters, auto-run pauses and you press “Run”.
- Nesting is limited to 1,000 levels to keep the browser from hanging on pathological input.
- The tree view shows 200 entries per level at a time (use “Show more”).
- Key sorting uses code-point order, not numeric order.
- Auto-repair involves guesses — always review the repaired output.
Privacy & safety
Your JSON and files are processed only inside your browser. Nothing is sent to or stored on any server, so you can safely format data that contains API keys or personal information. Closing the page discards everything.
FAQ
How do I fix an “Unexpected token” JSON error?
Why do large numbers (IDs) change in other tools?
Can it handle JSON with comments (JSONC)?
Is my data sent to a server?
What is the difference between formatting and minifying?
Related tools
XML Studio — Formatter & Validator
Paste XML to format, minify or validate it. Errors show the exact line, column and cause, and whitespace that carries meaning (mixed content, xml:space) is never touched. XPath search and JSON conversion are on the same screen. Your data never leaves your device.
YAML / TOML Studio — Validate, Format & Convert
Paste YAML, TOML or JSON to validate, format or convert it. Errors show the exact line and column, and type traps such as “no becomes false” and anything lost in conversion are flagged up front. Your data never leaves your device.
Diff Tool — Text & Code Compare
Paste or drop two versions and see added and removed lines, plus the exact words that changed inside each line. Copy or save the result as a unified patch. Nothing leaves your browser.
UUID / ULID / NanoID / Token Generator
A UUID is ready the moment the page opens. Switch to UUID v7, ULID, NanoID or a random token, generate up to 10,000 at once and save them as .txt, .csv or .json. Paste an existing UUID or ULID to read its embedded time and version.
Regex Tester
Type a pattern and matches light up in the test string instantly. Capture groups, replacement output and what each part of the pattern means are all on one screen — and patterns that would freeze your browser are stopped after one second.
Code Formatter — Format & Minify
Paste code to format it with the language auto-detected. Choose indent, line width, semicolons, quotes and trailing commas; JavaScript, CSS and HTML can also be minified with before/after size and reduction. Your code never leaves the browser.
Last updated: