DevMate
Back to Toolverse

Development

JSON Minifier

Minify a JSON fixture and compare its UTF-8 byte size before and after serialization. Review precision limits, malformed input, and the downloadable compact result.

Local processing
Loading tool workspace...

About this tool

When to use it

Minify a JSON fixture and compare its UTF-8 byte size before and after serialization. Review precision limits, malformed input, and the downloadable compact result.

How to use it

Use this workspace when preparing a compact request fixture or checking a text payload budget. Paste JSON, select Minify JSON, and inspect the byte comparison. Copy or download devmate.min.json. Editing or clearing the input removes the previous result. For reading a nested response, use JSON Formatter instead; both tools use the same JSON parsing rules.

Guide updated . Examples checked against this implementation.

Worked examples

Compact a two-field fixture

Input

{
  "project": "DevMate",
  "private": true
}

Expected output

{"project":"DevMate","private":true}

For exactly this input with LF line breaks and no final newline: 45 input bytes, 36 output bytes, and a 20.00% reduction. These are UTF-8 text sizes, not a prediction of gzip or Brotli savings.

Preserve spaces inside a string

Input

{ "label": "hello  world" }

Expected output

{"label":"hello  world"}

The two spaces inside the string remain. A regular expression that strips all whitespace would corrupt this value.

Errors and unsupported input

{"active":true,}

Remove the trailing comma. This tool accepts JSON syntax, not JavaScript object literals, comments, JSON5, or multiple JSON Lines records.

{"id":9007199254740993}

This parses, but JavaScript can round the number to 9007199254740992. Use a quoted string for an exact identifier and keep the original document.

Continue this workflow

Format references

Questions

Frequently asked questions

Why keep a minifier when the formatter can also minify?

The formatter is for inspecting a response. This workspace focuses on compact fixtures and an explicit byte comparison. Both share the same parsing and numeric limitations.

Can I use the result to recreate a signed payload?

No. Serialization can change byte representation even when values appear equivalent. Signature verification must use the original bytes required by the protocol.