datapry

JSON Minifier

Remove whitespace to make JSON as small as possible, with values left untouched. Runs in your browser, so nothing is uploaded.

JSON input

Minified JSON

Waiting for input

About this tool

Strip indentation and line breaks to shrink JSON for API payloads, fixtures and config values. Only whitespace outside strings is removed, so spaces inside your values and long numbers stay as they were.

How to use it

  1. Paste JSON or import a file.
  2. The minified result appears on the right.
  3. Copy or download it.

Example

Input
{
  "name": "Datapry Tools",
  "version": 1.10
}
Output
{"name":"Datapry Tools","version":1.10}

Spaces inside strings and the trailing zero in 1.10 are preserved.

Questions

Does minifying affect how JSON is parsed?
No. Whitespace between tokens has no meaning in JSON, so any parser reads the minified text the same way.
How much smaller will my file be?
It depends on the indentation. Heavily nested, indented files often shrink noticeably, while compact files barely change. Compression such as gzip usually saves more over the network.
Can I get the formatted version back?
Yes. Run the output through the JSON Formatter. Nothing except whitespace is removed, so no data is lost.