Skip to content
Dev

JSON Formatter

This JSON formatter pretty-prints, minifies, or validates JSON in your browser and points at the line where parsing fails.

Paste JSON here. Beautify, minify, and validate run in your browser only.

Status

Paste JSON, then beautify, minify, or validate. Copy uses the result when one exists.

Pretty-printed or minified JSON appears here. Copy result copies this text when it is not empty.

How to use

  1. Paste JSON into the editor.
  2. Choose Beautify for 2-space indentation, Minify for one line, or Validate to check without rewriting.
  3. If parsing fails, use the line and column hint. Repair only strips a leading BOM and trailing commas.

How it works

Beautify and Minify run JSON.parse, then JSON.stringify. Beautify uses two-space indentation. Minify uses no extra space. Validate reports the parser error and does not change your paste. Nothing is uploaded.

Example. The text {"a":1} beautifies to a two-line object with "a" indented under the braces, and minifies back to {"a":1}.

Frequently asked questions

Is my JSON uploaded?

No. Formatting runs locally. The text you paste is processed in your browser only. Quick Tools does not send JSON to a server, save it, or keep a copy after you close the tab.

Can it fix invalid JSON?

It flags parse errors with line hints. Auto-repair is best-effort only. Beautify and Minify may strip a leading BOM and trailing commas, then format the result. They will not invent missing keys, close unmatched brackets, or rewrite invalid structure. Use Validate to see the original error without changing your paste.

Does it convert JSON to CSV?

This page formats JSON. It pretty-prints, minifies, and validates JSON text. It does not export CSV, Excel, YAML, or tables.

What is the difference between Beautify and Minify?

Beautify pretty-prints with 2-space indentation so nested objects and arrays are readable. Minify removes extra whitespace and produces a single-line string, which is useful for payloads and config that must stay compact. Both require JSON that parses, or a successful best-effort repair.

How do line and column hints work?

When JSON.parse fails, the engine usually reports a character position and sometimes a line and column. This tool maps that position onto your paste (1-based line and column) so you can find the unexpected token, trailing comma, or truncated value.

Does this json formatter support comments or trailing commas?

Strict JSON does not allow comments or trailing commas. Validate reports those as parse errors. Beautify and Minify may remove trailing commas as a convenience; comments are not stripped. The output is always standard JSON.