JSON Minifier

Remove insignificant space from JSON. This is the reverse of the formatter.

Use this tool

Result

The result appears in this panel after you run the tool.

About this tool

Minify means JSON.stringify of the parsed value with no extra indent. The data is unchanged. The bytes are shorter only because the space was insignificant.

The JSON Formatter is the page that puts the indent back. Beautifying and minifying are that pair, not two different languages.

How to use it

  1. Paste JSON.
  2. Minify it.
  3. Copy the one-line reprint. Comments and trailing commas fail, because they are not JSON.

Limitations

A compact reprint of one parsed value

Spaces leave because the value is printed again

The minifier parses the box and prints the value with no spacer between tokens. Line breaks, indentation, and the space after a colon are not kept, because they were never part of the value. A file that is already compact stays compact if the printer agrees with its spelling. A file full of pretty gaps shrinks. Invalid text, including comments and trailing commas, fails the parse and produces no shortened document. The page does not skip a bad region.

Key order follows the order the parser stored. Names are not alphabetized. A repeated name collapses to one pair during the parse, so the short form cannot show both original values. Number spelling is normalized with the value. A token written as one with a decimal and a zero comes back without that decoration. Strings keep their contents, and escapes are written in the printer’s style rather than the exact escape letters you may have used for the same character.

Compact text is still only a syntax success

No schema is applied. A document can be tiny and still violate a contract you have not supplied. The schema validator is a developer page that needs a schema beside the data. The generator that drafts a schema from one sample is also elsewhere. This page answers whether the text parses, and what the compact printer emits. It does not rank keys, drop nulls, or remove empty objects.

Where the readable form went

If you still need to read the document, the formatter prints the same kind of parsed value with indent. The diff page reprints both sides with indent before it compares lines. Minifying first and then formatting gets readability back, but it will not restore a comment or a duplicate key the parse already discarded. Use the minifier when a parsed document should occupy fewer characters. Keep the original if those discarded details mattered.

Privacy

Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.