DFK Studio

Format and validate JSON

Format, minify, sort and validate JSON in your browser. Invalid JSON is reported with the line, the column and the offending text. Nothing is uploaded.

  • Free, no account
  • Nothing is uploaded
  • Runs in your browser

How it works

  1. 1 What goes in JSON, however it arrived
  2. 2 It runs in your browser On your own device. Nothing is uploaded, there is no queue and no account, and it keeps working with the network switched off.
  3. 3 What comes back It, indented — or the line that is wrong

What it does

Paste JSON and get it back readable, minified, or with its keys sorted. When it will not parse, you get the line and column and the text that broke it — the browser on its own only offers a character offset, which is no use in a 2,000-line file.

This page does the work itself. Your data is handled by the browser and never sent anywhere — there is no server here to send it to.

Questions

Why sort the keys?

Because it makes two documents comparable. JSON preserves the order keys were written in, so the same data serialised by two different programs produces a diff full of moved lines. Sorting both first leaves only the differences that matter.

Is my data sent anywhere?

No. JSON.parse and JSON.stringify are built into your browser, so this page needs no server to do its work. Load it once and it will keep working with the network switched off — which is the point, given that the JSON people need to check most often is the JSON they cannot paste into a stranger's website.

Does it accept JSON with comments or trailing commas?

No, and deliberately. Those are JSON5 and JSONC, not JSON; accepting them here would tell you a file is valid when the parser you are actually targeting will reject it.

Every shelf