Tools /  JSON Formatter

JSON Formatter

JSON整形
検証済TESTED
STATUS
·
SIZE
·
KEYS / ITEMS
·
paste some JSON above, or load the example.

Parsing happens live as you type, entirely in your browser; nothing you paste leaves this page.

How it works

仕組み

Paste any JSON and this tool validates it the instant you type, right in your browser; nothing is uploaded anywhere. Valid input gets pretty-printed with two-space indentation (or minified with one click), along with its byte size and a count of top-level keys or array items. Invalid input shows the parser’s own error message, and when the browser reports a character position, a caret pinpoints the exact spot in an excerpt of your text. It’s the quickest way to find the trailing comma or missing quote that broke a config file or API payload.

Why does my JSON fail with a “trailing comma” or “unexpected token” error?

Strict JSON forbids several things JavaScript allows: trailing commas after the last item, single quotes around strings, unquoted keys, and comments. The error excerpt with the caret usually lands right on the offending character. Fix that one spot and re-check; errors often cascade, so one fix can clear several complaints.

What’s the difference between pretty-printing and minifying?

Pretty-printing adds line breaks and two-space indentation so humans can read the structure; minifying strips every unnecessary space so the payload is as small as possible. The data itself is identical either way. Minified JSON is what you’d ship over the network; pretty is what you’d commit to a config file.

Do different browsers report JSON errors differently?

Yes. The message text comes from each engine’s parser, so Chrome, Firefox, and Safari word the same mistake differently, and not all of them include a character position. When a position is available the tool shows the caret excerpt; when it isn’t, read the message and check the end of the last line you edited.

More on the bench 他の道具
Regex Tester
CSS clamp() Calculator
Cron Expression Builder
Meta Tag Previewer
Shadow & Gradient Generator
Viewport Simulator
Tab Order Visualizer
Diff Checker