JSON Formatter Online — Beautify & Minify JSON in Your Browser

Paste any JSON to instantly pretty-print it with 2- or 4-space indent, sort object keys, or compact it to a single line. Everything runs locally — no signup, no uploads, no servers.

Open JSON Formatter →

How to format JSON online

  1. Open the editor and paste your JSON (Cmd/Ctrl + V), open a file, or drop a .json file anywhere on the page.
  2. Click Format (or press ⌘ /) to beautify with 2-space indent.
  3. Click Minify to compact to a single line; Sort to alphabetize keys deeply.
  4. Copy with Copy or download with Save.

Why JSON OS Formatter

Local-first

Parsing runs in a Web Worker on your machine. Nothing is uploaded.

Auto-repair

Trailing commas, smart quotes, unquoted keys, comments — fix and format in one step.

Three views

Switch between text, tree, and table views over the same document.

Validate inline

Errors highlighted in source with line and column.

Schema check

Validate against JSON Schema (Ajv) with format checks.

Free forever

No signup, no paywall, works offline once loaded.

Frequently Asked Questions

How do I format JSON?

Simply paste your unformatted JSON text into the editor. Press Cmd+/ or click the Format button. Your JSON will instantly be beautified with proper indentation.

Does this tool minify JSON?

Yes! We also provide a Minify button that strips all unnecessary whitespace and newlines from your JSON document.

Will this fix broken JSON?

Yes, the JSON Formatter has an Auto-repair feature that automatically fixes trailing commas, missing quotes around keys, single quotes, and comments.