DIAGRAMS + DOCUMENTATION

JSON Formatter & Validator

Buy me a coffee

Make JSON readable, validate strict syntax, or minify it without changing large IDs, number notation, escaped strings, or key order.

Up to 200,000 characters. Imports up to 1 MB. Whitespace changes only; no silent repair.

Valid JSON. 119 / 200,000 characters.

Format or minify valid JSON to create output.

Saved as formatted.json
Optional. Source and settings stay in this browser. Clearing removes all saved tool drafts.

JSON formatting without changing your data

Paste an API response, configuration file, or JSON payload to check its syntax before sharing it. Formatting changes whitespace, not values: large numeric IDs beyond JavaScript's safe integer range, exponent notation, negative zero, escaped strings, duplicate keys, and property order stay intact.

Pretty-print, minify, and copy JSON for documentation

Choose 2 spaces, 4 spaces, or tabs and select Format JSON for readable output. Minify removes whitespace outside strings. Copy JSON copies the output as text; Copy fenced JSON adds a Markdown code fence with the json language tag. Edit the file name and check the exact Saved as preview before downloading a .json file.

Strict validation, not automatic repair

Errors include one-based line and column locations. Comments, trailing commas, single-quoted strings, and incomplete values are rejected, never silently fixed. Duplicate keys are allowed by JSON syntax and kept in place, with a warning because other readers may discard earlier values. Up to 20 errors and 20 warnings are shown.

Local processing with explicit limits

Files stay in your browser. Imports are limited to 1 MB (1,000,000 bytes); all source input is limited to 200,000 characters and 49 nesting levels for reliable formatting and a responsive editor. Pretty-printed output is limited to 2,000,000 characters. Oversized input is rejected, not truncated. Source editing and undo remain separate from the read-only, selectable output.

Nothing is saved as a draft unless you enable Remember my work on this device. That option restores source, indentation, and file name locally; avoid enabling it for sensitive JSON on a shared device. Clear saved data removes all saved tool drafts. After editing the source or formatted indentation, create fresh output before copying or downloading.