Skip to content
Language:en

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

  1. Paste your JSON (or CSV) in the left box; it is formatted automatically.
  2. Use Minify, Sort keys or Repair as needed.
  3. Convert to CSV or from CSV with the dedicated buttons.
  4. 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.

Frequently asked questions

Why is my JSON invalid?
The most common causes are a trailing comma after the last item, single quotes instead of double quotes, keys without quotes and comments. Click Repair to fix all of these at once.
Does sorting keys change my data?
No. Only the order of keys inside objects changes, which JSON ignores. The order of array items is kept.
Can I open a very large file?
Documents of several megabytes format in a fraction of a second. Beyond tens of megabytes the text box itself becomes slow, but the conversion still works.
Which CSV format is produced?
Comma-separated, with a header row and quotes only where needed (RFC 4180), which Excel, LibreOffice and Google Sheets open directly.