JSON & Data Tools

JSON Minifier

Compact valid JSON into a single line and compare its size with the original.

Press Ctrl / ⌘ + Enter to run
Read-only result

Compact valid JSON into a single line and compare its size with the original.

What this tool does

JSON Minifier checks your JSON and removes unnecessary whitespace to make it smaller. Spaces inside strings, escaped line breaks, and Unicode characters are preserved.

  • Invalid JSON does not produce results that appear to be usable.
  • Size is calculated in UTF-8 bytes and shows the difference before and after compression.
  • The output can be downloaded as minified.json.

How to use it

  1. Paste the valid JSON.
  2. Click "Compress".
  3. View single row results and size statistics.
  4. Copy the results or download the JSON file.

Common uses

  • Reduce the front-end inline configuration or test fixture.
  • Compare the size of pretty print and compact transfer formats.
  • Clear meaningless indentation without changing the value.

JSON Minifier Features

Turn valid JSON into a compact single line and compare its size with the original. Review the result, then copy it for use.

FAQ

Will spaces in the string be removed?

No. Only unnecessary spacing and line breaks between JSON values are removed. Spaces inside strings are preserved.

Will the field order change?

The output usually keeps the input’s field order, though numeric keys may be reordered. Do not rely on JSON field order to carry meaning.

Why might the savings percentage be 0%?

If the input is already compact, the result may be as long as the original text, or may be reduced by only a few bytes.

Back to Developer Tools