Web Tools Box

All tools / JSON Formatter

Advanced JSON Formatter & Viewer

Paste JSON to validate it as you type, then beautify it for readability or minify it to the smallest size. Explore nested data in a collapsible tree view, and turn arrays of objects into a CSV file with one click. Everything runs in your browser — nothing is ever sent over the network.

Input (JSON)
Paste JSON and the syntax is checked as you type.

Enter JSON to see the syntax check result here.

Output
Switch between formatted or minified text and an interactive tree view.
Output style
Indent

Enter valid JSON to see the formatted result and tree view here.

How to use this tool

  1. 1. Paste your JSON: Paste or type JSON into the input box on the left, or click “Load sample” to try it out. The syntax is checked as you type, and any error is shown with its line, column, and cause.
  2. 2. Choose Format or Minify: “Format” pretty-prints the JSON with your choice of indentation (2 spaces, 4 spaces, or tabs). “Minify” removes line breaks and spaces to produce the smallest single-line output.
  3. 3. Explore the tree view: In the “Tree view” tab, expand and collapse objects and arrays like folders. Use “Expand all” or “Collapse all” to toggle everything at once, and hover over an item to see its path, such as $[0].profile.country.
  4. 4. Copy or download CSV: Click “Copy” to copy the result to your clipboard. If your data is an array of objects, a “Download CSV” button appears so you can save it as a spreadsheet-friendly file.

Peace of mind with 100% local processing

Some online JSON formatters send what you paste to a server for processing. This tool handles validation, formatting, minifying, the tree view, and CSV conversion entirely with JavaScript in your browser. Your JSON is never sent over the internet or stored on our servers.

That means you can safely format and inspect JSON that contains information you can't share — API responses, app configuration files, or exported customer data. Your input is cleared from the browser when you close or reload the page.

CSV files are generated in your browser and downloaded directly. To prevent spreadsheet apps like Excel from running cell values as formulas, strings that start with =, +, -, or @ are prefixed with ' (protection against CSV injection).

Ways to use CSV export

CSV files are saved as UTF-8 with a BOM, so non-English text displays correctly when you open them in Excel.

Frequently asked questions

Is my JSON sent to a server?
No. Validation, formatting, minifying, the tree view, and CSV conversion all run in your browser (JavaScript). Nothing you enter is sent to or stored on any server, so you can safely work with JSON that contains sensitive data, such as API responses or config files.
I see a syntax error. How do I fix it?
The error panel shows the line and column of the problem, explains the cause (for example, “There is an extra comma after the last item”), and marks the exact spot with a caret (^). Common causes are trailing commas, single quotes, unquoted keys, and comments.
What kind of JSON can be exported to CSV?
When your JSON is an array of objects (for example, [{"id":1,"name":"A"}, {"id":2,"name":"B"}]), a “Download CSV” button appears automatically. If objects have different keys, every key becomes a column and missing values are left blank. Nested objects and arrays are written into a single cell as JSON text.
Can it handle large JSON files?
Files up to a few megabytes work smoothly. The tree view only renders the levels you open and shows large arrays 100 items at a time, so it stays responsive even with many values. Performance still depends on your device.