JSON formatter, validator and converter
Beautify, validate, minify, sort and repair JSON, and convert it to or from CSV.
Result
Runs entirely in your browser. Your files never leave your device.
About this tool
Paste a JSON document, an API response or a configuration file and get it indented and readable at once. If something is wrong, the validator tells you the line and column of the error and places the cursor on it.
Repair turns “almost JSON” into valid JSON: it removes comments and trailing commas, converts single quotes and quotes bare keys, which is handy for JavaScript objects or JSON5 files. You can also minify for production, sort keys alphabetically to compare two files, and convert an array of objects to CSV for a spreadsheet, or a CSV export back to JSON. Your data, often containing tokens or personal records, never leaves the browser.
How it works
- Paste your JSON (or CSV) in the left box; it is formatted automatically.
- Use Minify, Sort keys or Repair as needed.
- Convert to CSV or from CSV with the dedicated buttons.
- Copy or download the result.
Nested objects are flattened into columns named with dots (for example “user.name”) when converting to CSV. When reading CSV, the separator (comma, semicolon, tab or pipe) is detected and numbers, booleans and empty cells are typed automatically.
Worked example
A config snippet copied from JavaScript, {name: 'Ana', tags: ['a', 'b',],}, is not valid JSON. Repair quotes the key, switches to double quotes and removes the trailing commas: {"name": "Ana", "tags": ["a", "b"]}.
For an API response with a missing comma, the validator reports something like “line 14, column 3” and places the cursor there, instead of leaving you to scan 300 lines by eye.
Good to know
- Sort keys before comparing two JSON files: the diff then shows real changes, not reordering.
- Minify only for production; keep the readable version in your repository.
- JSON has no comments: if you need them, keep a JSON5 or YAML source and convert it.