Format and validate JSON
Valid JSON, pretty. Broken JSON, located and mostly fixed.
- Errors by line and column
- Fix in one click
- Big numbers kept exact
- Nothing uploaded
1.Paste JSON, or open a file
JSON, JSONC or plain text. Drag it here, or choose a file.
2.Format, minify or fix it
Fix removes comments and trailing commas, converts single quotes and quotes bare keys. Nothing else is guessed at.
Why it exists
Most JSON that fails to parse was written by a person, and people write JSON the way they write JavaScript: a comment here, a trailing comma there, single quotes, a key without quotes. A validator that answers "Unexpected token at position 4031" is technically right and practically useless. This one says which line and column, in words, and for those four habits it offers to undo them rather than asking you to hunt.
What it does
- Formats with two spaces, four spaces or tabs, or minifies to the smallest file.
- Validates strictly, and names the problem in words with its line and column.
- Puts the cursor on the problem with one click, so you can see it in context.
- Fixes comments, trailing commas, single-quoted strings and unquoted keys, and says how many of each it changed.
- Keeps numbers exactly as written, so a 20-digit ID is not rounded on the way through.
What Fix will not do
It will not guess. A missing comma between two values, an unclosed bracket or a stray character could each be repaired in more than one way, and a formatter that picks one silently can change what the document means. Those are reported with their line and column, and the decision stays yours.
Questions
- Is my JSON sent anywhere?
- No. It is parsed by code running inside the page. There is no server behind this tool, and nothing you paste or open leaves the tab.
- Why does it keep my long numbers when other formatters change them?
- Most formatters parse JSON into JavaScript numbers, which hold about 15 significant digits, so 12345678901234567890 comes back as 12345678901234567000. This keeps every number as the text it was written as, and only the whitespace around it changes.
- Does it support JSON5 or JSONC?
- It reads the parts of them people use most, comments, trailing commas, single quotes and unquoted keys, and Fix turns them into standard JSON. It always writes standard JSON.
- How large a file can it handle?
- Tens of megabytes on a desktop browser. Past 2 MB the text is no longer shown in the box, so the page stays responsive, but formatting and fixing still work on the whole file.
The other tools
- Open a CSV file onlineDrop a file in. It opens in your browser, and it stays there.Open it
- Run SQL on a CSV fileReal SQL, on your file, without installing a database.Open it
- Merge CSV files into oneSeveral files in, one file out, columns matched by name.Open it
- Remove duplicate rows from a CSVDuplicates on the columns you say identify a row.Open it
- Compare two CSV filesAdded, removed, changed, matched on a key rather than line by line.Open it
- Convert a CSV to PDFA CSV, laid out as a readable table, saved as a PDF.Open it
- Convert a CSV to ExcelA real .xlsx, with nothing in it changed on the way.Open it
- Convert a CSV to JSONEvery row an object, every header a key.Open it
- Convert JSON to CSVA tree, flattened into a table you can open anywhere.Open it
- Convert Excel to CSVEvery sheet of a workbook, out as clean UTF-8 CSV.Open it
- Split a CSV fileOne file too big to use, as several that are not.Open it
- Clean up a messy CSVGermany, germany and “Germany ” become one value again.Open it
- Convert a CSV to SQL INSERT statementsA CSV in, a .sql script any database will run.Open it
- View JSON as a tree or a graphThe shape of a JSON document, before you read a line of it.Open it
- Turn a Markdown outline into a mind mapType a list. See a map.Open it
- Make a printable 30-day challenge trackerThirty boxes per habit, on paper, where you will see them.Open it
- Reverse a videoPlay it backwards, sound and all, without uploading it.Open it