Skip to content
Devlar

Runs in your browser. Your input stays on your device.

JSON Minifier

Remove every space, tab, and line break that JSON does not need, without touching your data. See the original size, the minified size, and how much smaller it gets.

Opens a file from your device. The file is read in your browser and is not uploaded.

0 characters · 0 B

0 characters · 0 B

Privacy: This tool runs in your browser. Your input is processed on your device and is never uploaded to a server.

How to use

  1. Paste the JSON you want to shrink into the JSON input box, or select Load example.
  2. Select Minify, or press Ctrl+Enter (Cmd+Enter on a Mac) anywhere in the tool, not only in the input box. Press ? to see all keyboard shortcuts.
  3. Read the summary next to the output: the original size, the minified size, and the percentage saved. The size lines under the input and the output give both sizes too.
  4. If the input is not valid JSON, read the error message above the output. Go to error moves your cursor straight to the problem.
  5. Select Copy output, or Download .json to save the result as minified.json.

Example

Indented JSON minified. Spaces inside the "motd" string are kept. The result is 53 bytes (18.8%) smaller.

Input
JSON
{
  "service": "orders-api",
  "version": "2.3.1",
  "port": 8080,
  "features": {
    "rateLimit": true,
    "maxRequestsPerMinute": 120
  },
  "allowedOrigins": [
    "https://app.example.com",
    "https://admin.example.com"
  ],
  "motd": "Scheduled maintenance  at 02:00 UTC"
}
Output
JSON
{"service":"orders-api","version":"2.3.1","port":8080,"features":{"rateLimit":true,"maxRequestsPerMinute":120},"allowedOrigins":["https://app.example.com","https://admin.example.com"],"motd":"Scheduled maintenance  at 02:00 UTC"}

Frequently asked questions

Does minifying change my data?

No. Only whitespace between tokens is removed. Spaces inside string values, key order, repeated keys, and every digit of every number stay as they were. The single exception is a byte order mark at the very beginning of the input, which is dropped.

How much smaller will my JSON get?

That depends on how much indentation and how many line breaks the original contains. A 5 MB test file indented with 2 spaces shrank by about 32%, while JSON that is already compact may not change at all. The summary shows the exact saving for your input.

Is minifying worth it if my server uses gzip or Brotli?

Compression already removes most of the cost of repeated whitespace, so the saving on the wire is much smaller than the raw numbers here suggest. Minifying still pays off when JSON is stored on disk, embedded in a web page or a bundle, or sent somewhere without compression.

Can I get the readable version back?

Yes. Minifying removes nothing but whitespace, so no information is lost. Paste the minified text into the JSON Formatter to indent it again.

Where is my JSON processed?

Entirely inside this browser tab. The minifier never sends your input anywhere, so the JSON you paste never leaves your device.

JSON Formatter

Format and beautify JSON with your choice of indentation, and find syntax errors by line and column.

JSON Validator

Check JSON for errors with line, column, and code context, and catch duplicate keys and unsafe large numbers.

CSV to JSON Converter

Convert CSV or TSV to JSON with delimiter detection, header handling, and optional, lossless type detection.

Keyboard shortcuts

Run the tool, from anywhere in it
Ctrl+Enter
Show this list (outside text fields)
?
Close this list
Esc