Paste messy JSON — validate it, pretty-print it, or minify it
Every page here solves one real JSON task: the exact steps, a live tool you can paste into, and the mistakes that cause the errors. Everything runs in your browser — nothing is uploaded.
JSON how-tos
- Compare Two JSON Objects — Diff two JSON documents by normalising both first: sort keys and pretty-print so a line-by-line comparison shows real changes, not formatting noise.
- Convert CSV to JSON — Turn a CSV file — with a header row — into a JSON array of objects. Learn how the header becomes keys, how to handle commas inside quotes, and how types are decided.
- How to Convert JSON to CSV — A clear walkthrough of turning a JSON array of objects into CSV: how columns are chosen, how nested values and booleans are handled, and the pitfalls that break the import.
- Convert JSON to YAML — Turn a JSON object or array into clean YAML by hand or with a converter. Learn the exact mapping of objects, arrays, strings, and multi-line values so the result parses.
- Decode a JWT — A JWT is three base64url parts separated by dots. Decode the header and payload to plain JSON to see the claims — without verifying the signature.
- Flatten Nested JSON — Turn a deeply nested JSON object into a flat map of dot-notation keys like user.address.city — handy for spreadsheets, env vars, and feature flags.
- How to Escape a String for JSON — Which characters must be escaped to put raw text inside a JSON string, what each escape sequence means, and how to do it reliably instead of by hand.
- JSON Pretty Print — Paste minified or messy JSON and pretty-print it with clean 2-space indentation so it is readable. Runs in your browser; copy with one click.
- JSON to TypeScript Interface — Turn a sample JSON object into a TypeScript interface: map each field to its type, mark optional fields, and handle nested objects and arrays.
- Minify JSON Online — Paste JSON and minify it to a single compact line with no spaces or newlines. Runs in your browser; copy the result with one click.
- Fix Invalid JSON — The most common reasons JSON fails to parse and exactly how to fix each: single quotes, trailing commas, comments, unquoted keys, and unescaped newlines.
- Sort JSON Keys Alphabetically — Sort the keys of a JSON object so the output is deterministic — useful for clean git diffs, cache keys, and comparing two versions of a config.
- Unescape a JSON String — Reverse JSON string escaping: convert \n to real newlines, \" to quotes, and \\ to a single backslash — recovering the original text from an escaped value.
- Validate JSON Online — Paste JSON and check whether it is valid. This validator runs in your browser, tells you the top-level type when it parses, and points to the exact line and column when it doesn't.