Tolket

Skip to content

JSON Minifier: Compress JSON Online

Strip every unnecessary space and line break from JSON to make it as compact as possible for APIs, config files and storage. The data is validated first, so you never ship a broken file.

Validate and minifyError line and columnSort keysRuns locally

How to use it here: paste your JSON and press Minify. The status line shows that the JSON is valid and the minified size; then Copy result or Download .json. To make minified JSON readable again, press Format / Beautify or use the full JSON Formatter & Validator.

What JSON minification does

JSON ignores whitespace between values, so indentation and line breaks are only there for humans. Minifying removes them and leaves exactly the same data in fewer bytes. A file indented with two or four spaces typically shrinks by 10–30%, more if it is deeply nested.

{
  "name": "Tolket",
  "free": true
}

becomes {"name":"Tolket","free":true}.

How to minify JSON

  1. Paste JSON into the input box, or press Load sample to try it.
  2. Tick Sort keys A–Z if you want a stable key order, which makes files easier to compare in version control.
  3. Press Minify. If there is a syntax error, the message points to the line and column.
  4. Copy or download the result.

When to minify, and when not to

SituationMinify?
JSON embedded in HTML, a data attribute or a URLYes
Storing many records (local storage, a database column)Yes
API responses served with gzip or BrotliOptional: compression already removes most whitespace cost
Config files people edit (package.json, settings)No, keep them readable

Good to know

Frequently asked questions

Does minifying change my data?

No values change. Only whitespace is removed, apart from the number formatting and duplicate-key behaviour described above.

Is it safe to paste JSON with API keys or customer data?

Yes. Parsing and minifying run entirely in your browser; nothing is uploaded or logged.

How large a file can I minify?

Several megabytes work fine. Very large files are limited only by your browser’s memory.

Related tools

More quick tools

Character counterCase converterSERP previewWi-Fi password generator

Scroll to Top