How to use
- Paste JSON, open a file, or try the sample.
- The compact result updates as you type. Review the size savings.
- Copy or download the minified result.
Smaller JSON, with every value intact
Minification removes indentation, line breaks, and other unnecessary whitespace outside JSON strings. The output remains plain-text JSON that a normal JSON parser can read.
Use it for a compact fixture, a single-line request body, or a file that does not need human-readable indentation. The result panel compares actual UTF-8 sizes instead of character counts.
How minification works
The tool checks the document and scans its JSON tokens. Whitespace tokens outside strings are omitted; the original text of each remaining token is copied into the result. A quoted space or escaped newline is part of a string and is retained.
The result keeps numeric notation such as 1.00, 1e+30, and -0. It also keeps property order and duplicate names, which helps avoid unexpected changes in consumers that treat those details differently.
{
"message": "hello world",
"values": [1, 2, 3]
}{"message":"hello world","values":[1,2,3]}The space in “hello world” belongs to a string and is preserved. The surrounding indentation and line breaks are removed.
Understanding the size comparison
Input and output sizes are measured as UTF-8 bytes. Bytes saved are the input size minus the output size; the percentage is that difference divided by the input size. Emoji and many non-English characters take more than one byte.
An already compact document may save nothing. A file with lots of indentation may shrink noticeably. If you choose an optional final newline, the output can be slightly larger than an already compact input; the result reports that honestly.
Minification is different from compression
Minification produces JSON text. HTTP compression, such as gzip or Brotli, encodes response bytes for transport and requires decoding. A server can use both, but this tool’s percentage measures only the plain-text JSON change, not transfer savings after HTTP compression.
Up to 5 MiB of UTF-8 input, 20 MiB of output, 128 nesting levels, 250,000 scanned tokens, and 10 seconds per run. Large documents may need a more capable device.
Frequently asked questions
Does minification run automatically?
Yes. The read-only result updates after a brief pause without changing your input. Turn off Auto minify to run manually with Minify JSON or Ctrl/⌘ + Enter.
What happens if my input becomes invalid?
The previous valid result stays visible for comparison. Copy, Download, and Use as input are disabled, and size savings are cleared until the current input produces a valid result. Clear empties both editors.
Does minifying remove spaces inside strings?
No. Spaces inside quoted strings, escaped characters, and encoded line breaks are preserved. Only unnecessary whitespace outside strings is removed.
Is this the same as gzip compression?
No. The download is a plain-text .json file, not a compressed archive. Your server may separately apply gzip or Brotli for HTTP delivery.
Will numeric notation change?
No. Large integers, decimal zeros, exponent notation, and negative zero retain their exact written form. Minification does not convert them to floating-point values.
Why is the output not smaller?
There may be no extra whitespace to remove. A selected final newline adds a byte, so an already compact input can become slightly larger. The size comparison includes that choice.
Why does the compact output still wrap onto several lines?
Wrap lines changes how long text is displayed in the editor. It does not insert line breaks into the copied or downloaded JSON. Turn wrapping off to inspect a single visual line.
Can I turn the result back into readable JSON?
Yes. Use JSON Formatter to add indentation again. It can produce readable JSON, but cannot reconstruct the exact whitespace layout that minification removed.
Does my JSON leave my device?
No. Pasted text and local files are processed in your browser. DevToolsy does not upload documents or save a document history. Download a result before leaving the page if you need to keep it.