JSON Formatter

Format, validate, and minify JSON. Catches syntax errors with line + column.

100% Private
Your files never leave your device
Lightning fast
Optimised for speed
No sign-up
Use instantly, no account
Input
Everything runs in your browser — nothing is uploaded.
Indent

Format, validate, and explore JSON instantly. Beautify or minify, browse a collapsible tree, sort keys, auto-repair broken JSON, and convert to TypeScript types or YAML — all locally, with precise error messages when something’s off.

How to use JSON Formatter

  1. 1Paste, type, or drop a .json file into the input.
  2. 2See it validated live, with the exact line and column of any error.
  3. 3Switch between Text and Tree views, beautify, minify, or sort keys.
  4. 4Copy the result, download it, or convert to TypeScript / YAML.

Fixing broken JSON

Real-world JSON is often invalid — copied from a log with trailing commas, written with single quotes, or pasted with comments from a config file. The Repair pass handles all of these: it removes trailing and duplicate commas, converts single quotes to double, quotes bare keys, and strips // and /* */ comments, then re-validates so you can see exactly what changed.

When a repair isn’t possible, the error message points to the precise line and column, so you can fix the source instead of guessing.

Exploring large payloads

API responses can be thousands of lines deep. The Tree view turns them into a collapsible structure with type colours, array and object counts, and a search box that jumps to any matching key or value. You can copy a single value or its full JSON path — handy when you’re writing code to reach a deeply nested field.

Frequently asked questions

No. Parsing, validation, and conversion all run in your browser, so payloads — including API responses with tokens or personal data — never leave the page.
Often, yes. Hit “Repair” and it removes trailing or duplicate commas, strips comments, converts single quotes to double quotes, and quotes unquoted keys. It also lists every problem it finds with line and column numbers.
Yes. The Tree view shows a collapsible structure with type colors and counts, a search box to find any key or value, expand/collapse-all, and one-click copy of a value or its JSON path.
Yes — the Convert menu generates TypeScript interfaces from your JSON, and can also output YAML.
Yes — free and unlimited, with no account required. Format, validate, and convert as much as you need.

Still have questions?

If you can’t find the answer you’re looking for, our support team is here to help.

Contact Support
Secure Fast Private
More tools

Keep going.

Browse all tools