Skip to main content

JSON Minifier

Compress JSON by removing whitespace and see exactly how many bytes you saved.

Runs in your browser — your data never leaves your deviceFree, no sign-up
Minified output

The minified JSON will appear here.

How it works

The tool parses your document with the browser’s native JSON engine and re-serializes it with no unnecessary whitespace. Because it parses rather than strips characters blindly, the output is guaranteed to be valid, and whitespace inside string values is never touched.

The header shows the before/after byte sizes and the percentage saved.

Features

  • One-click minification
  • Exact size savings: bytes before, bytes after, percent
  • Invalid input reported with line and column
  • Copy and download the result
  • String values preserved exactly (no blind whitespace stripping)
  • 100% client-side processing

How to use

  1. Paste formatted JSON or upload a .json file.
  2. Press Minify.
  3. Copy the output or download minified.json.

Example

Input (pretty-printed, 128 bytes):

{
  "name": "DevCodivo",
  "tools": 6,
  "free": true
}

Output (minified):

{"name":"DevCodivo","tools":6,"free":true}

Frequently asked questions

Does minifying change my data?
No. Minification removes only whitespace between tokens — every value, key and key order is preserved. The minified document parses to exactly the same data as the original.
Why minify JSON?
Smaller documents transfer faster, load faster and take less storage. For API responses and config files served to users, minified JSON can cut size by 30–70% compared with pretty-printed JSON.
Is my JSON sent to a server for minification?
No. Minification happens locally in your browser. Nothing is uploaded, stored or logged.
What does the size-savings percentage mean?
It compares the UTF-8 byte size of your input with the byte size of the minified output. If your input is already minified, expect savings near 0% — that is correct, not a bug.
Can I minify JSON with comments?
No — comments are not part of the JSON standard, so documents containing them are invalid and cannot be minified by any standard JSON tool. Remove the comments (or switch to a format like JSONC handled elsewhere) first.