Flowfiles ← All tools

Beautify · Minify · Validate · Tree view · No upload

JSON Formatter & Minifier

Paste raw JSON to pretty-print it with clean indentation, collapse it to a single minified line, validate it with an exact error line and column, or explore it as a collapsible tree. Control the indent size, sort keys alphabetically, escape non-ASCII characters, and repair common mistakes like trailing commas and comments. Everything runs in your browser — nothing is uploaded.

Mode
Indent
Options
Input JSON
Formatted output
Waiting for input
Ready

Key features

Beautify & minify

Switch between clean indented output and a single compact line in one click, with 2, 3, 4-space or tab indentation.

Precise validation

Invalid JSON reports the exact line and column of the problem, so you fix the real cause instead of guessing.

Lenient repair

Strip // and /* */ comments, drop trailing commas and quote bare keys to rescue almost-JSON.

Collapsible tree

Browse large documents as an expandable tree with child counts to find the field you need fast.

Frequently asked questions

How do I beautify or pretty-print JSON?

Paste your JSON, keep the Beautify tab selected and choose an indent size. The formatted, indented version appears on the right instantly. Use Copy or Download to take it with you.

How do I minify JSON to one line?

Click the Minify tab. All whitespace and line breaks are removed and the JSON collapses to the smallest valid single-line form, ideal for embedding in config files, query strings or API payloads.

My JSON has trailing commas or comments — can you fix it?

Yes. Tick Repair (lenient). The tool removes // line comments, /* */ block comments and trailing commas, and adds quotes around unquoted object keys before re-formatting strict JSON.

What does "Sort keys A→Z" do?

It re-orders every object's keys alphabetically at all nesting levels. That produces a stable, diff-friendly output so two versions of the same data line up cleanly in version control.

Is my data sent to a server?

No. Parsing, formatting and validation all happen locally in your browser using JavaScript. Nothing leaves your machine and the page keeps working offline once loaded.

JSON guides