⚡Free Tools

JSON Formatter, Validator & Viewer

Beautify, minify and validate JSON with clear error messages, one-click repair, a collapsible tree with copyable paths, and JSON ↔ CSV/YAML conversion. Private: nothing leaves your browser.

Input Ln 1, Col 1

What this JSON formatter does

Paste any JSON and press Format (or Ctrl+Enter) to get clean, indented JSON with 2 spaces, 4 spaces or tabs. Minify removes every unneeded space so the payload is as small as possible for an API request or a config file. Validate checks the text against the JSON standard (RFC 8259) and tells you, in plain language, exactly what is wrong and where: the line, the column and a small snippet with a caret under the problem character.

Everything happens inside your browser tab. Nothing is uploaded, which matters when the JSON is an API response with customer data, an access token, or a production config. You can switch off your internet after the page loads and the tool still works, and you can install it as an app from the header.

Why this one is different

How to use it, step by step

  1. Paste JSON into the left box, drop a .json file onto it, or click Open file. Auto-format on paste is on by default.
  2. Choose the indent, then press Format. If the JSON is invalid, read the red message and press Go to error, or try Repair.
  3. Switch to Tree view to explore the structure. Use Expand all for small files; for large files open only the branches you need.
  4. Use Copy, Download (Ctrl+S) or the ⇄ button to send the output back to the input for another step, for example Format → JSON to CSV.

Common JSON errors and how to fix them

Trailing commas

JavaScript allows [1, 2, 3,] but JSON does not. Remove the final comma or press Repair.

Single quotes and unquoted keys

Text such as {name: 'Asha'} is a JavaScript object literal, not JSON. JSON needs {"name": "Asha"}. Repair converts both.

Comments

Standard JSON has no comments. Files like tsconfig.json use a relaxed format (JSONC). Repair strips // and /* */ comments so the data can be read by a strict parser.

Line breaks and tabs inside strings

A string must stay on one line; write a new line as \n and a tab as \t. Repair escapes raw line breaks for you.

Several JSON values in one file

Log files often contain one JSON object per line (NDJSON). A single JSON document can only hold one value, so wrap them in [ ] and separate them with commas to inspect them together.

JSON to CSV: how nested data is handled

CSV is a flat table, so each object in a top-level array becomes a row. Nested objects become dotted columns (address.city, address.pin), arrays are written as JSON text in one cell, and every key seen in any row becomes a column, so rows with missing fields stay aligned. Cells containing commas, quotes or line breaks are quoted according to RFC 4180, which Excel, Google Sheets and LibreOffice all read correctly. Choose TSV if you want to paste straight into a spreadsheet.

Privacy and limits

The tool has been tested with inputs over 1 MB, Hindi and emoji text, and malformed files. Very large files (tens of MB) depend on your device's memory. History keeps your last twelve inputs below 250 KB each in localStorage; clear it at any time from the History window. Nothing is sent to our server or to any third party.

Frequently asked questions

Is my JSON uploaded anywhere?

No. Parsing, formatting and conversion run in JavaScript inside your browser tab. You can disconnect from the internet after the page loads and it keeps working.

Why did another formatter change my long ID numbers?

JavaScript numbers are 64-bit floats, exact only up to 9,007,199,254,740,991. Tools that parse and re-stringify round larger values. Our Format and Minify keep the original digits, and the tool warns you when a step would round them.

How do I find the error in invalid JSON?

Press Validate or Format. The message shows the line and column, a snippet with a caret under the problem, and a plain-language reason. Go to error moves the cursor there.

What does Repair change?

It removes comments and trailing commas, converts single quotes to double quotes, quotes bare keys, turns True/False/None into true/false/null, replaces NaN and Infinity with null, escapes raw line breaks in strings and closes missing brackets at the end. Always review the result.

Can it convert JSON to Excel?

Use JSON → CSV or JSON → TSV, then open the downloaded file in Excel or paste TSV directly into a sheet. Nested fields become dotted column names.

How large a file can it handle?

It is tested with files over 1 MB. Formatting multi-megabyte files works on most laptops; the tree view loads branches only when you open them so it stays responsive.

Keyboard shortcuts

Ctrl + EnterFormat
Ctrl + Shift + MMinify
Ctrl + Shift + RRepair
Ctrl + Shift + CCopy output
Ctrl + SDownload
TabInsert two spaces in the input