Skip to content

JSON Minifier

Strip every optional byte from a JSON document and see what you saved.

Quick Tool Overview

The JSON Minifier strips every byte a parser does not need — indentation, line breaks and the spaces after colons and commas — and reports exactly how much smaller the document became. The data itself is untouched.

What it does
Removes all optional whitespace from a JSON document
You give it
A formatted or pretty-printed JSON document
You get back
The same data on one line, plus the bytes saved
Best for
Shrinking API payloads, config bundles and stored JSON
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the JSON Minifier

Minifying JSON removes every character a parser does not need: the indentation, the line breaks and the space after each colon and comma. The data is untouched — the same document goes in and comes out, only smaller.

The saving is usually larger than people expect. A pretty-printed API response is commonly 20 to 40 per cent whitespace, and on a payload sent thousands of times a day that adds up. The tool reports the size before, the size after, the bytes saved and the percentage, so you can decide whether it is worth doing. It can optionally sort keys at the same time, which makes two minified payloads directly comparable.

Key features of the JSON Minifier

The saving in numbers

Size before, size after, bytes removed and the percentage are all reported, so you can judge whether minifying is worth it.

Data is never altered

Only whitespace outside string values is removed. Spaces inside your strings, key order and array order all survive exactly.

Optional key sorting

Sort keys while minifying so two payloads from different services become directly comparable.

ASCII-safe output

Escape non-ASCII characters as \u sequences when the payload has to pass through a system that mangles UTF-8.

Validation comes free

A document that cannot be minified is a document that does not parse, and the error tells you where.

How to use the JSON Minifier

  1. 1

    Paste the JSON

    Any formatted or partially formatted JSON document works.

  2. 2

    Choose the options

    Optionally sort keys alphabetically or escape non-ASCII characters as \u sequences.

  3. 3

    Check the saving

    The stat row shows the original size, the minified size and the percentage removed.

  4. 4

    Copy or download

    Take the result to your clipboard or save it as a .json file.

Frequently asked questions

No. Only whitespace outside string values is removed. Every key, value and array order is preserved exactly, and spaces inside a string are untouched.

Reviews of the JSON Minifier

What people who use the JSON Minifier think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the JSON Minifier. It takes half a minute and no account.

Write the first review

More developer tools