01 / Quotes
Double quotes only
Keys and text values go in "double quotes". Single quotes and keys without quotes are JavaScript, not JSON.
Free tool
Paste JSON or open a .json file. It is checked and laid out with colours at once; a mistake shows the exact line and column with an arrow under it. Fix repairs the usual problems in JSON copied from code or an AI answer: comments, trailing commas, single quotes, keys without quotes. Minify it, sort the keys, or browse it as a tree.
Comments, trailing commas, single quotes, keys without quotes, and True, False or None from Python.
Options
Tree
Cmd or Ctrl and Enter formats.
Your JSON is read in your browser. It is never uploaded, so API keys and private data stay with you.
The rules
01 / Quotes
Keys and text values go in "double quotes". Single quotes and keys without quotes are JavaScript, not JSON.
02 / Commas
A comma goes between items, never after the last one in a list or an object.
03 / Values
Text, numbers, true, false, null, lists and objects. No comments, no undefined, no NaN.
Questions
On this page, yes: the JSON is checked and formatted by your own browser and never leaves the tab. That is not true of every online formatter, so check before you paste secrets elsewhere.
The reader met a character it did not expect at that spot, often a single quote, a comment, a missing comma between two items, or an extra comma at the end. The arrow under the line shows where it stopped; the mistake is there or just before it.
It removes comments and trailing commas, turns single quotes into double quotes, puts quotes round bare keys, and turns True, False and None into true, false and null. It never changes your values. Look over the result, since it guesses what was meant.
Files of several megabytes format in a moment. Above about 1.5 MB the colours are left off to keep the page quick, and the tree shows the first 5,000 items.
The same data with every space and line break that is not needed taken out, so it is smaller to send or store. Format turns it back into readable lines.