JSON formatter

Paste JSON from an API, a config file or a log and make it readable in one step. Errors are shown with the exact line and column. You can also minify JSON, sort keys alphabetically, explore it as a collapsible tree, and convert between JSON, CSV and YAML. Your data never leaves your browser.

Action
Indent
CSV separator

Your text stays on your device. Everything is processed in your browser.

How to use JSON formatter

  1. Paste your JSON (or CSV or YAML), or open a file.
  2. Choose an action: format, minify, tree view or one of the conversions.
  3. Copy the result or download it as a file.

Frequently asked questions

How do I find the error in my JSON?

Paste it and the tool shows the line and column where reading stopped, with a marker under the spot. Common causes are a missing comma, a comma after the last item, single quotes instead of double quotes, and keys without quotes.

How is JSON converted to CSV?

An array of objects becomes a table: each object is a row and each key a column (keys missing from a row are left empty). Nested objects and arrays are written as JSON text in their cell. Choose a comma, a semicolon (which Excel expects in many European and Turkish settings) or a tab as the separator.

And CSV to JSON?

The first row is used for the column names and every other row becomes an object. Numbers, true, false and null become real JSON values; values with leading zeros, such as postcodes, stay as text.

Is there a size limit?

Up to 5 MB of text. The tree view shows the first 3,000 items so the page stays fast; the formatted text always contains everything.

Is my data safe?

Yes. Reading and converting happen in your browser and nothing is uploaded, so you can paste API responses or settings that contain private values. To compare two versions of a file, use Text Compare.

Other tools