Your data never leaves this tab

Free JSON Minifier Online

Strip whitespace and comments from JSON to produce compact, minified output — instantly in your browser.

Formatted JSON
Minified JSON

How it works

1

Paste your JSON

Paste formatted or readable JSON into the input field.

2

Minify

Click Minify JSON or press Ctrl+Enter. All whitespace is removed.

3

Copy the result

The minified single-line JSON is ready to copy and deploy.

4

Fully in-browser

Uses JSON.parse and JSON.stringify — no server, no uploads.

Common use cases

Reduce payload size

Minified JSON significantly reduces API response and config file sizes, saving bandwidth and improving load times.

Prepare for deployment

Strip human-readable formatting from config files before bundling into production builds where size matters.

Compressing test fixtures

Minify large test fixture files to reduce repo size and make them less likely to conflict in version control.

Inline JSON in code

Minify JSON before embedding it as a string literal in source code to keep lines short.

Frequently asked questions

What does JSON minification do?

It removes all unnecessary whitespace (spaces, tabs, newlines) while keeping the JSON valid. The output is a single line with no extra characters.

Does minification change the data?

No — only whitespace is removed. All keys, values, and structure are preserved exactly. The minified JSON is semantically identical.

How much does minification reduce file size?

Typical formatted JSON is 20–50% larger than minified. The savings depend on indentation depth and how many string values there are.

Can I minify invalid JSON?

No. The minifier uses JSON.parse which validates the JSON first. Invalid JSON will show an error — use the JSON Validator to find the issue.