{ }

JSON formatter and validator

Beautify, minify and validate JSON with exact error lines, explore it as a tree, and convert JSON to CSV and back.

โœ“ Freeโœ“ No sign-upโœ“ Files stay on your device

๐Ÿ”’ Works offline in your browser. Your files are not uploaded anywhere.

How to use JSON Formatter

  1. Paste your JSON, open a .json file, or press Sample. It is checked as you type.
  2. If there is a mistake, the exact line and column are shown with a pointer. Press Show me to jump there.
  3. Press Format to pretty print (2 spaces, 4 spaces or tabs, optionally with keys sorted) or Minify to remove all spaces.
  4. Switch the result to Tree to fold and unfold objects, or use the JSON โ†’ CSV and CSV โ†’ JSON tabs to convert data for Excel or Google Sheets.

About this tool

JSON (JavaScript Object Notation) is the text format almost every web API, app config and database export uses. It is easy for programs to read, but a single missing comma or an extra quote makes the whole file unreadable, and a 2 MB response squeezed onto one line is impossible to scan by eye. This formatter fixes both problems: it validates the data with clear error messages and lays it out with proper indentation, all inside your browser, so API keys, customer records and tokens in your JSON are never uploaded.

The most common JSON errors (and how to fix them)

Error messageCauseFix
Trailing comma is not allowed[1, 2,] or {"a":1,}Delete the last comma
Keys must be in double quotes{name: "Ada"}Write {"name": "Ada"}
Text must use double quotes'hello'Use "hello"
Missing comma after the valueTwo properties with no comma between themAdd a comma at the end of the line shown
Line break inside a text valueA text that runs over several linesWrite \n instead of pressing Enter
Comments are not allowed// note inside the fileRemove comments (JSON has none)
undefined / NaN is not allowedJavaScript values pasted from a consoleUse null or a number

Why this formatter keeps your numbers exact

Many online formatters run your text through the browser's built-in JSON.parse, which silently rounds large integers: an order ID like 90071992547409931 becomes 90071992547409930. That can break a database import or a payment lookup. This tool uses its own strict parser that keeps every number exactly as written, keeps keys in their original order and warns you about duplicate keys, which most programs resolve by quietly keeping the last value.

JSON to CSV for spreadsheets

A list of objects becomes one row per object. Nested objects are flattened into dotted column names (address.city), lists of simple values are joined with commas and more complex lists are kept as JSON text. Choose a semicolon separator if your Excel uses a comma as the decimal mark (common in Europe and South America). Downloads include a UTF-8 marker so Excel shows accented letters and other scripts correctly. CSV to JSON reads quoted fields, commas inside quotes and line breaks inside cells, and can turn numbers and true/false into real JSON values.

Frequently asked questions

Is my JSON sent to a server?

No. Parsing, formatting, the tree view and CSV conversion all run in your browser. You can even use the page offline once it has loaded.

How big a JSON file can it handle?

Files of several megabytes work well on a computer. Files up to 50 MB can be opened; the tree view loads big lists 300 items at a time so the page stays responsive.

What is the difference between format and minify?

Format (also called beautify or pretty print) adds line breaks and indentation so people can read it. Minify removes every unnecessary space and line break to make the file as small as possible for sending over a network. The data itself is identical.

Does it accept JSON with comments or single quotes (JSON5)?

No. It checks strict JSON, the format required by APIs and most programs, and tells you exactly where comments, single quotes or trailing commas break that standard so you can fix them.

Why does my CSV open in one column in Excel?

Your Excel expects a different separator. Choose Semicolon in the separator list and download again, or use Data โ€บ From Text/CSV in Excel and pick the separator there.

More Text Tools