Skip to content
Document tools

JSON Minifier

Strip the spaces and line breaks from JSON to make it as small as possible.

Minify your JSON

Result
Paste your JSON and press Minify JSON. The result appears here.
Runs in your browser. Nothing you paste or open is uploaded. Numbers are kept exactly as written, so long IDs are never rounded.

About this tool

Indented JSON is easy to read, but the spaces and line breaks add weight to every API response, config value and stored record. Paste JSON or open a file and press Minify to get it on one line with no extra whitespace, then see how many bytes you saved and copy or download the result.

The minifier checks the JSON first, so it never produces broken output: if there is a mistake, you get its line and column instead. Strings, numbers and key order stay exactly as they were, so the data means the same thing. Everything runs in your browser and nothing is uploaded.

How it works

  1. Paste or open JSONPaste text, or open a .json file up to 10 MB.
  2. MinifyPress Minify to remove every space and line break outside strings.
  3. Copy or downloadSee the size saved, then copy or save the result.

Questions people ask

Does minifying change my data?
No. Only whitespace between values is removed. Text inside strings, numbers and the order of keys stay exactly the same.
How much smaller will it be?
It depends on how much indentation the JSON had. Deeply nested, pretty-printed files shrink the most, and the page shows the exact saving.
Should I minify or use gzip?
For web traffic, both: servers usually compress responses with gzip or Brotli, and minifying first still trims a little more. For files you store or paste into one line, minifying alone helps.
Good to know

Before you minify

Keep a readable copy

Minified JSON is hard to read and edit. Keep the formatted version for editing and minify only what you ship.

Sort keys for stable output

Sorting keys gives the same output for the same data, which helps caching and comparing versions.

Strings stay untouched

Spaces and line breaks inside strings are part of your data, so they are kept exactly as they are.