Skip to content
100% in your browser. Nothing you paste is uploaded — all processing runs locally. Read more →

JSON Formatter & Validator

Paste JSON. Get pretty, valid JSON back. The status line tells you if it's valid, how many keys it has, and how the byte size changed.

What this tool does

Why client-side

The other "JSON formatter" sites all upload your JSON to their server to format it. That's a privacy and bandwidth tradeoff for no reason — parsing and re-serializing JSON is a JavaScript built-in, JSON.parse(JSON.stringify(...)). Your browser already has everything needed.

tooljo's formatter does exactly that, in ~3 KB of JS. Nothing leaves your machine. Open DevTools → Network and verify.

The status line

Below the editor you'll see something like:

✓ Valid JSON · 27 keys · 412 bytes (-58 bytes (12% smaller))

"Keys" counts every key in every nested object, recursively — useful for spot-checking that an export didn't lose data.

Common JSON errors

Tips

API coming soon

For server-side use cases (CI fixtures, bulk validation, schema generation), we're building an HTTP API. Drop your email below to be notified.

FAQ

Is my JSON sent to a server?

No. Everything runs in your browser. Open DevTools → Network and paste anything you want — no requests are made while you format.

How big a JSON can it handle?

Hundreds of MB in modern browsers. The bottleneck is the textarea rendering, not parsing. For files larger than ~50 MB, paste in chunks or use a streaming parser in your application code instead.

What if my JSON is invalid?

The status line shows the parser's error message — usually 'Unexpected token X at position N', which points at the byte offset. Common causes: trailing commas, unquoted keys, single quotes (use double), unescaped backslashes in strings.

Can I sort the keys?

Yes. Tick the 'Sort keys' checkbox. Sorting is recursive — every nested object gets keys sorted alphabetically. Useful for diffing two JSONs that differ only in key order.

Does it handle JSONC (JSON with comments)?

No — strict JSON only. Comments aren't valid JSON, so they're rejected. For JSONC (used in tsconfig.json, VS Code settings), strip the comments first or use a JSONC-aware tool.