Kit-Bin
Donate
Download as .json

You can also drop a .json file anywhere on the box above to load it.

This tool re-indents JSON so it is readable, strips whitespace when you need it compact, and tells you exactly where a broken document breaks. Paste your JSON in the box, then use Format, Minify, or Validate. Nothing is sent anywhere, the parsing happens in this tab.

What each button does

  • Format parses the JSON and rewrites it with the indent you picked, one property per line.
  • Minify parses it and writes it back with all optional whitespace removed, which is what you want before putting JSON in a config value or a request body.
  • Validate parses without changing your text, and reports the line and column of the first problem it finds.

Reading the error message

A parse error names the character position where the document stopped making sense, which is not always where the mistake is. A missing closing bracket, for example, is usually reported at the next token, one or more lines later. Start at the reported line and column, then look upward for the unclosed bracket, brace, or quote.

The three most common causes are a trailing comma before a closing brace or bracket, a missing comma between two entries, and single quotes where JSON requires double quotes.

Two things formatting can quietly change

Formatting round-trips your document through a real parser, so it is not purely cosmetic. Duplicate keys in the same object collapse to the last one that appears. And numbers are parsed as doubles, so an integer larger than roughly 9 quadrillion, or a decimal with more significant digits than a double holds, comes back rounded. If either applies to your data, validate rather than format.

FAQ

Do I have to upload a file?
No. Paste your JSON straight into the box and use the buttons. Dropping a .json file in is only a shortcut that fills the box for you, and even then the file is read locally and never sent anywhere.
Does it tell me where the error is?
Yes. When parsing fails, the tool reports the line and column of the character the parser choked on, plus the reason. Browsers report the failure position differently, so the tool maps it back onto your text itself rather than passing the raw browser message through.
Does formatting change my data?
It changes only whitespace and key order is preserved as written, with two exceptions worth knowing. Duplicate keys collapse to the last one, because that is what JSON.parse does. And very large integers beyond about 9 quadrillion, or numbers with more precision than a double can hold, get rounded, since JSON numbers are parsed as JavaScript doubles.
Will it accept JSON with comments or trailing commas?
No. Comments, trailing commas, single-quoted strings, and unquoted keys are all invalid JSON, and the validator flags them rather than silently accepting them. If you need those, you are writing JSON5 or JSONC, which is a different format.
Is there a size limit?
There is no fixed limit, but everything runs in your browser tab, so a very large document (tens of megabytes) can make the tab slow or unresponsive while it parses and re-renders. For files that big, prefer a command line tool.

Need this JSON as a table? Use JSON to CSV. Coming from a spreadsheet instead? Use Excel to JSON or CSV to JSON.

Deciding which format to store your data in? Read CSV vs JSON: Which One Do You Need?