Free JSON minifier — no upload, no account

Minify JSON
Compact, valid,
bytes saved.

Minify JSON to its smallest valid form or beautify it with 2 or 4 spaces. Validates as you type, shows the exact error position and the bytes saved. Runs entirely in your browser — your JSON never leaves your device.

Your data never leaves your browser
Minify or beautify
Live validation with line and column
64-bit integers kept exact
Always free
JSON Minifier & Beautifier   100% client-side
JSON input
  JSON ready

      

What does minifying JSON do?

Same data, fewer bytes.

Minifying removes every character that JSON does not need: spaces, tabs, line breaks and indentation between tokens. The data is identical — a parser reads the minified and the formatted version exactly the same way — but the payload is typically 10–30% smaller, which matters for API responses, localStorage, cookies, message queues and configuration stored in a database. Beautifying does the opposite: it re-indents minified JSON so a human can read and review it.

Unlike regex-based minifiers, this tool parses the JSON first. Text inside strings is never touched, invalid JSON is reported with its line and column instead of being silently mangled, and integers longer than 15 digits (64-bit IDs) are written back exactly as they were.

Minify JSON in code

The same result in your own scripts.

// JavaScript / Node.js
const minified = JSON.stringify(JSON.parse(text));

# Python
import json
minified = json.dumps(json.loads(text), separators=(",", ":"), ensure_ascii=False)

# Command line (jq)
jq -c . input.json > output.min.json

When to minify and when to beautify

Minify for production

API responses, static JSON files served to browsers, data embedded in HTML and anything stored with a size limit (cookies, localStorage, URL parameters before Base64).

Beautify for people

Code review, debugging an API response, committing configuration to Git (diffs are readable) and documentation.

Related JSON tools

All utilities & encoding tools

Frequently asked questions

Common questions about minifying JSON online.

How do I minify JSON?

Paste your JSON or open a .json file. The minified result appears as you type; copy it or download it as a .json file. Choose "Beautify" to indent it instead.

Does minifying JSON change the data?

No. Only whitespace between tokens is removed. Strings, numbers (including 64-bit integers), key order and nesting stay exactly the same unless you choose to sort the keys.

What happens if my JSON is invalid?

The tool shows the error with its line and column. A "Repair JSON" button fixes common problems such as single quotes, trailing commas, comments and Python literals (None, True, False).

Is my JSON uploaded anywhere?

No. Everything runs in JavaScript in your browser. You can confirm it in your browser's Network tab: no request is made while minifying.
Go up