JSON Minifier

Compress JSON by removing whitespace. Free, private & fast – 100% in browser.

Input JSON
Minified JSON
All minification runs entirely in your browser. Your JSON is never uploaded to our servers. No data is stored, logged, or transmitted.

When minification helps

JSON Minifier removes unnecessary whitespace so payloads, fixtures, and embedded configuration take less space.

It is useful before pasting JSON into environment variables, test fixtures, API examples, or static assets where formatting is not needed.

  • Compact API request bodies for transport or examples.
  • Reduce whitespace in JSON fixtures committed to a repository.
  • Prepare JSON for single-line config fields.

Data preservation rules

Standard minification parses the input and serializes it with JSON.stringify, so values stay the same while whitespace is removed.

Aggressive minify removes null and empty string values from objects. Use that option only when changing the data shape is acceptable.

  • Whitespace outside strings is removed.
  • Whitespace inside string values is preserved.
  • Null and empty strings are removed only when aggressive mode is enabled.

Before you copy

Validate the source JSON before minifying important data. A compact payload is harder to inspect manually after whitespace is removed.

Keep a formatted version nearby when you need to review structure or explain the payload to another person.

  • Use Beautifier to inspect minified output.
  • Use Validator when a minified payload fails downstream.
  • Download the result when you need a stable .json file.

Examples & Usage

Formatted JSON

Sample JSON with indentation and whitespace

Input

{
  "name": "John Doe",
  "age": 30,
  "address": {
    "street": "123 Main St",
    "city": "New York"
  },
  "active": true
}

Minified Output

Same JSON with all whitespace removed

Input

{"name":"John Doe","age":30,"address":{"street":"123 Main St","city":"New York"},"active":true}

Frequently Asked Questions

What does JSON minification do?

Minification removes all unnecessary whitespace (spaces, newlines, tabs) from JSON, producing the smallest valid representation. Optionally, you can also remove null and empty string values for even smaller output.

Is my data safe?

Yes. All processing happens locally in your browser. No data is sent to any server.

What is 'Remove null & empty strings'?

When enabled, the tool strips null values and empty strings from objects. Use with caution – this changes the structure and might not be suitable for all use cases.

Related Tools

Need Help?