Skip to content

Minify JSON

Remove every space and line break from JSON to make it as small as possible for APIs, storage and config.

  • Runs in your browser
  • Code never uploaded
  • Free

Your JSON

Minified

When to minify JSON

Minified JSON has no spaces or line breaks, so it's as small as possible to send over a network, store in a database or embed in code. The data itself is unchanged.

Minifying also validates the JSON: if there's a syntax error, you'll see it before shipping. To make minified JSON readable again, use the JSON formatter.

How to minify JSON

  1. 01

    Paste or drop your code

    Paste JSON into the left box, or drop a file onto the page.

  2. 02

    It's minified instantly

    the browser's built-in JSON engine minifies it as you type. Adjust the options above the editor if you need to.

  3. 03

    Copy or download

    Copy the result, or download it as a .min file. The size savings, including gzipped size, appear below.

Features

Four languages

JavaScript with Terser, CSS with CSSO, HTML with html-minifier-terser, and JSON.

Real savings

See original, minified and gzipped sizes, which is what visitors actually download.

Instant

Minification runs in a background thread as you type, so even large files stay responsive.

Clear errors

Syntax errors show the line and column so you can fix the source quickly.

Your code stays private

Nothing is uploaded. Minify proprietary code without sending it to anyone.

Free and open source

No limits, no sign-up, and the source is on GitHub.

Frequently asked questions

Is my code uploaded?

No. Minification runs entirely in your browser in a Web Worker. Your code never leaves your device.

Does minifying change my data?

No. Only whitespace between values is removed. Keys, values and order stay exactly the same.

How do I make JSON readable again?

Use the JSON formatter at dev.devsamc.xyz to pretty-print it with indentation.

Is minification the same as obfuscation?

No. Minifying makes code smaller and is easy to reverse with a formatter. To make JavaScript hard to read, use the JavaScript Obfuscator at obfuscate.devsamc.xyz.

More free tools