JSON Forge

JSON Formatter

Beautify or minify your JSON — formatted live as you type. Runs entirely in your browser.

Indent2

JSON input

Formatted output

No output yet

Start typing valid JSON on the left — the result appears here instantly.

About the JSON Formatter

A JSON formatter takes minified, escaped, or messy JSON and rewrites it with consistent indentation and line breaks so it is easy to read and review. Paste a single-line API response and get back a clean, hierarchical document you can actually scan.

This formatter runs entirely in your browser — your JSON is never uploaded to a server. It parses the input with the same engine your code uses, so if it formats successfully, the document is valid JSON. You can switch to Minify to strip every unnecessary byte before shipping to production.

How to use the JSON Formatter

  1. 1Paste or type your JSON into the input editor on the left.
  2. 2Choose Beautify to indent it, or Minify to compress it — the output updates live as you type.
  3. 3Adjust the indentation slider (1–8 spaces) to match your project's style.
  4. 4Copy the result, download it as a file, or switch the output to Tree view to explore nested data.

Common uses

Debugging API responses

Turn a wall of minified JSON from a network tab into a readable, indented structure.

Preparing config files

Standardise indentation across package.json, tsconfig, and other JSON configs.

Shrinking payloads

Minify JSON to reduce bandwidth for production APIs, caches, or embedded data.

Frequently asked questions

Is my JSON uploaded anywhere?

No. All formatting happens locally in your browser using JavaScript. Nothing is sent to a server, so it is safe for private or sensitive data.

What's the difference between beautify and minify?

Beautify adds indentation and line breaks to make JSON human-readable. Minify removes all optional whitespace to make the file as small as possible for transmission or storage.

Why does the formatter show an error?

The tool validates as it formats. Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or missing brackets. The error and the exact line are highlighted in the editor.

How large a file can I format?

Everything runs on the main thread in your browser, so there is a 5 MB cap to keep the page responsive. Larger files should be processed with a command-line tool such as jq.

Does formatting change my data?

No. Formatting only changes whitespace. Keys, values, order, and types are preserved exactly.