Private JSON minifier

JSON Minify

Minify JSON online by removing extra spaces and line breaks. Compare sizes, then copy or download the result without uploading your file.

JSON MINIFIERMake your JSON more compact in one click.
Runs in your browser
Input JSON
Options

Minify keeps spaces inside quoted text. Sorting keys changes their order.

Original size92 B
Output size—
Size change—
Files stay in your browser No sign-up Free to use
01

What Is JSON Minification?

JSON minification makes JSON more compact by removing extra spaces and line breaks that aren't part of the data. Spaces inside quoted text, such as a person's name, are preserved.

This is useful when you want smaller JSON for an app or for sharing. If the JSON is already compact, there may be nothing to remove. Everything runs in your browser, and you can copy or download the result.

02

How to Minify JSON Online

01

Paste or choose a file

Paste JSON into the box or choose a .json file from your device. Your data stays in your browser.

02

Click Minify JSON

The tool checks your JSON and removes unnecessary spaces and line breaks.

03

Copy or download

See the original and output sizes, then copy or download the compact JSON.

Need more readable spacing? Use JSON Formatter. If your input has a syntax error, check it with JSON Validator.

03

JSON Minify Example

See how extra spacing disappears while the name and list items stay the same.

ORIGINAL JSON
{
  "user": {
    "id": 101,
    "name": "Jane Smith"
  },
  "roles": ["editor", "viewer"]
}
MINIFIED JSON
{"user":{"id":101,"name":"Jane Smith"},"roles":["editor","viewer"]}

The space in "Jane Smith" stays, and "editor" is still listed before "viewer".

04

What Changes When You Minify JSON?

Minify removes extra spaces and line breaks without changing quoted text. You can also sort keys or switch to Format JSON for easier reading.

JSON contentWhat happens?
Extra spaces, tabs, and line breaksRemoved outside quoted text.
Spaces inside quoted textKept, including the space in "Jane Smith".
Numbers, even very large onesKept exactly as written when you minify without sorting.
Items in arraysKept in the same order.
Order of object keysKept unless you turn on Sort keys alphabetically.
Comments in JSONNot supported. Remove comments before minifying.
05

JSON Minify vs Format vs Gzip

OperationWhat it doesResult
JSON MinifyRemoves extra spaces and line breaks.Compact JSON text you can copy or use.
JSON FormatAdds indentation and line breaks.JSON that is easier to read and edit.
GzipCompresses the file or response.Data that needs to be decompressed first.

JSON Minify is not the same as Gzip. Use JSON Formatter if you need to read or edit a complex document.

06

When to Use JSON Minification

API Responses

Remove extra spacing from JSON responses when you want less text to transfer or store.

JSON Configuration Files

Make configuration files smaller before moving or storing them. Keep a readable copy for editing.

Sharing JSON Data

Copy compact JSON into another tool or message while keeping spaces inside names and other text.

07

Common JSON Minify Problems

Why can't my JSON be minified?

Check for missing commas, quotation marks, or brackets. JSON comments and trailing commas aren't supported. Try JSON Validator to find syntax mistakes.

Why did my JSON file size stay the same?

If there are no extra spaces or line breaks outside strings, the document is already compact. There may be nothing left to remove.

Why is the output larger?

Format JSON adds spaces and line breaks, which can increase the size. Sorting keys can also change how the result is written. Check the size figures to see what changed.

08

Frequently asked questions

What is JSON minification?

JSON minification makes JSON smaller by removing extra spaces and line breaks outside quoted text. Spaces inside names, messages, and other text stay untouched.

How do I minify JSON online?

Paste JSON or choose a .json file, then click Minify JSON. Review how much the size changed, and copy or download the result. Your file stays in your browser.

Does minifying JSON change its data?

With the default settings, the tool removes only extra spaces and line breaks outside quoted text. Numbers, text, and the original order of keys and list items stay the same. Sort keys alphabetically changes the order of keys.

Does JSON Minify always reduce file size?

No. If your JSON already has no unnecessary spaces or line breaks, it may stay the same size. Formatting can make the file larger. Compare the original and output sizes to see the difference.

Can I compress a JSON file without uploading it?

Yes. Use Choose local file to open a .json file from your device. The tool works in your browser without uploading the file. Files must be 10 MB or smaller.

What is the difference between JSON minify and JSON.stringify?

JSON.stringify() is a JavaScript function that creates JSON text from a value. Minifying existing JSON simply removes extra spaces and line breaks. Unlike some JSON.parse() and JSON.stringify() conversions, this tool's default Minify mode keeps large numbers exactly as written.

Is JSON minification the same as Gzip compression?

No. JSON Minify removes extra spaces and line breaks, leaving you with JSON text you can use right away. Gzip compresses the data into a format that must be decompressed first.

Is my JSON uploaded to a server?

No. Pasted JSON and files you choose are processed in your browser. The contents are not uploaded to our servers.