JSON formatter and validator

Format, minify and check JSON: errors with line and column, numbers and key order kept, and a repair mode for JSON from JavaScript, Python or AI.

The data entered in the form are processed only in your browser and will not be saved or sent anywhere.
Lines: 0
Comments, trailing commas, single or curly quotes, keys without quotes, True/False/None, a ```json fence.

Format and check JSON

An API answer on one endless line, a config file nobody can read, or a "JSON" from a chatbot that your program refuses? Paste it, choose the indentation and press "Format". Valid JSON comes back neatly indented, with a count of objects, lists and keys, and the size before and after. "One line (minified)" does the opposite and squeezes out every space before you send it on.

When something is wrong, you get the line and the column, a plain description ("a comma is probably missing after the previous value") and the line itself with the spot marked. No more counting brackets by hand.

Your numbers stay yours. Most online formatters run the text through the browser's own JSON reader, which quietly rounds 12345678901234567890 to 12345678901234567000, turns 1.10 into 1.1 and moves the key "2" before "b". This tool has its own parser: numbers and the order of keys come out exactly as they went in. "Sort keys A-Z" sorts them only when you ask, at every level.

Repair mode. JavaScript objects, Python dictionaries and chat answers look like JSON but are not quite: comments, a comma before the closing bracket, 'single quotes', keys without quotes, True and None, curly quotes from a word processor, the whole thing wrapped in ```json. Tick "Repair JSON written by JavaScript, Python or an AI chat" and the tool fixes those and lists every change, so you know what was touched. Duplicate keys are reported too: most programs silently keep only the last one.

Examples

  • A one-line API response formatted with 2 spaces to find the field you need.
  • A config with a missing comma: "Line 3, column 3", and the line shown with the culprit marked.
  • JSON from an AI chat with comments and True/None, repaired and minified for a test.

Who it is for

Developers, testers, analysts reading API answers, and anyone who pastes JSON into a config, a ticket or a chatbot. Nothing leaves the browser, so company data is safe to paste.