JSON Minifier
Compress JSON into a single line with no unnecessary whitespace — ideal for embedding in code, environment variables, URLs or network payloads. The tool validates the JSON as it minifies.
Runs in your browser
How to use
- Paste your JSON.
- Copy the minified output.
- Check the byte savings under the result.
How it works
The JSON is parsed and serialised again without indentation, which removes every space, tab and line break outside strings. Whitespace inside string values is never touched.
Savings are measured in UTF-8 bytes, the encoding used over the network.
Examples
- Config for an environment variable
- A 40-line indented config becomes one line you can paste into a .env value.
Common uses
- Reducing API payload size
- Embedding JSON in HTML or environment variables
- Storing compact JSON in databases
Privacy & security
This tool runs entirely in your browser. Your files and text are never uploaded to our servers — processing happens on your device and results are created locally. How each tool handles files
Frequently asked questions
Is minified JSON still valid?
Yes. It contains exactly the same data; only formatting whitespace is removed.
How much smaller will it be?
Typically 10–30% for indented JSON. For network transfer, gzip or Brotli compression saves much more on top.
Last updated: