# JSON Minifier

URL: https://phishdestroy.io/developer-tools/json-minifier
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Paste formatted JSON and get it on one line with all whitespace outside strings removed; a note under the result shows how much shorter it got.

## Example input

Indented IOC record

```
{
  "indicator": "login.example.com",
  "type": "domain",
  "tags": ["phishing", "credential-harvest"]
}
```

Gives {"indicator":"login.example.com","type":"domain","tags":["phishing","credential-harvest"]} and, below it, the length before and after.

## FAQ

### How is the JSON minified?

It is parsed with JSON.parse and written back with JSON.stringify, which removes every space and line break outside strings; strings and values are not changed. The line under the output compares the input and output length.

### What are the limits?

The input must be strict JSON, without comments or trailing commas. Because the data passes through JavaScript, integers above 2^53 are rounded and duplicate keys keep only the last value, and the size line counts characters, which equals bytes only for ASCII text.

### Is my JSON sent anywhere?

No. Minifying runs in your browser and nothing is uploaded.

## Related tools

- [JSON Formatter](https://phishdestroy.io/developer-tools/json-formatter)
- [JSON Key Sorter](https://phishdestroy.io/developer-tools/json-key-sorter)
- [JSON Diff](https://phishdestroy.io/developer-tools/json-diff)
- [JSON & JavaScript String Escaper](https://phishdestroy.io/developer-tools/string-escaper)
- [JSON to TOML Converter](https://phishdestroy.io/developer-tools/json-to-toml)

All tools: https://phishdestroy.io/developer-tools
