JSON Formatter & Validator
Paste an API response or a config file. Even internal company data stays on your device.
Make unreadable JSON readable
JSON from APIs, logs and config files often arrives as one long line. This tool indents it so the structure is visible and, if it's invalid, points to the exact line and character of the problem. It uses the browser's own JSON parser, so results match the standard, and nothing you paste is sent to a server — safe for internal data or responses with personal information.
What it does
- Pretty — indent with 2 spaces, 4 spaces or tabs.
- Minify — strip whitespace and line breaks to save space; sizes before and after are shown.
- Sort keys — orders object keys alphabetically, handy for diffing two JSON documents. Array order isn't changed.
- Escape / unescape — turn text into a JSON string (quotes and line breaks become \" and \n) or the reverse; great for pulling JSON out of a log line where it was stored as a string.
- Non-ASCII as \uXXXX — for systems that only accept ASCII.
Common errors
JSON looks like JavaScript but is stricter: keys and strings need double quotes, no trailing commas, and no comments, undefined or NaN. The error message shows the offending line with a ^ marker and, for common mistakes, how to fix it. Statistics (values, depth, size) appear above the result.
To view JSON as a spreadsheet, use Excel ↔ JSON; to encode text, use Base64 Encode/Decode.
Frequently asked questions
Does it handle very large JSON?
Tens of MB work, though the browser may pause briefly.
What about JSON5 or JSON with comments?
Only standard JSON. Remove comments and trailing commas first.
Big numbers change.
JavaScript can't represent integers beyond about 16 digits exactly. Store large IDs as strings.
Related tools
- Excel to JSON / JSON to ExcelTurn spreadsheet rows into a JSON array, or JSON into an Excel table (flattens nested keys)
- Base64 Encode / DecodeText (UTF-8) ↔ Base64, files and images → data URI, Base64 → file
- Regex TesterHighlight matches, see capture groups, preview replacements, common patterns
- Color Code ConverterConvert HEX, RGB, HSL, HSV and CMYK, check WCAG contrast, get lighter/darker shades
- Color Palette GeneratorComplementary, analogous, triadic and monochrome palettes from one color, or extract colors from a photo
- Favicon GeneratorText, emoji or logo → favicon.ico, 16–512 px PNGs, Apple touch icon and web manifest in a ZIP