Tools · JSON

JSON formatter and validator

Format, minify, validate — and when it is not valid, the fix has a name and a line.

no signup · runs entirely in your browser · ⌘V works anywhere on this page
See it done · 12 s
Format JSONA one-line order opens as Valid JSON; the tree is its structure, given the whole width; Convert, formatted writes it out two spaces per level, keys in their order — the Foot measures the result. · 12 s

What you get

  • Formats the 765 b minified sample into 54 lines — two spaces per level, keys in their order
  • Minifies the 54-line order back to one line of 765 b
  • Validates: “Valid JSON”, or every problem by line with the fix’s name — and Fix all, then format, in one click
  • Copies or downloads the result; opens the same text in the app for the tree, undo and the rest

What it will not do

  • Reorder keys, sort anything or change a value. Formatting is whitespace; the numbers and strings are the ones you pasted.
  • Upload the text. The engine runs in your tab; nothing is sent.
  • Guess at broken JSON silently. A broken document gets the verdict and the list, and formats only after you press Fix all.

What each button does

Format
{"a":1,"b":[1,2]}{ "a": 1, "b": [ 1, 2 ] }

Two spaces per level; the keys stay in the order the text has them.

Minify
{ "a": 1 }{"a":1}

Every space and line break outside a string goes.

Validate

The verdict, and each problem by line with the fix’s name. Fix all rewrites only those lines; the app’s ⌘Z puts them back.

A number is a number

Formatting rewrites whitespace, never a value: 1.50 stays 1.50, a 64-bit id stays what it was.

The sample

What the first sample opens — a real file, not an illustration written for this page.

clean-order-example.min.json
{"order_id":"ord_8f3aa19c4d","created_at":"2026-04-21T14:32:08Z","status":"fulfilled","customer":{"id":"cus_4129","email":"rin.aoyama@oboro.studio","name":"Rin Aoyama","verified":true,"loyalty_tier":"gold"},"items":[{"sku":"BRD-OAK-002","title":"Oak End Grain Cutting Board","qty":1,"unit_price":124,"tax_rate":0.0875},{"sku":"OIL-MNRL-008","title":"Food Safe Mineral Oil 8oz","qty":2,"unit_price":12.5,"tax_rate":0.0875}],"shipping":{"method":"standard","address":{"line1":"240 Mercer St","line2":null,"city":"Brooklyn","region":"NY","postal":"11211","country":"US"},"tracking":"1Z999AA10123456784"},"totals":{"subtotal":149,"tax":13.04,"shipping":8.5,"grand_total":170.54},"metadata":{"campaign":"spring-26","referrer":null,"notes":["gift wrap","leave at door"]}}

in VS Code

Format Document is VS Code’s own; the extension adds the verdict to the status bar and the named fixes to the lightbulb.

unstringify for VS Code14-day trial · Free and Pro

Questions

What indent does it use?

Two spaces per level — the app’s convert indent. Keys keep the order the text has them in.

Does it change numbers?

No. Formatting rewrites whitespace between tokens and nothing else; 1.50 stays 1.50 and a long id stays intact.

What happens when the JSON is not valid?

The verdict says what is wrong — “Not valid JSON yet · N fixable” — and lists each problem by line with the fix’s name. Fix all rewrites those lines, then formats.

Is it a linter?

It reports what the parser and the fix pipeline find: quotes, commas, literals, brackets. It does not check a schema.

Try it on the file that broke your afternoon.

free while in alpha · no signup