Free Online Minifier:
Strip comments and whitespace from JSON6 and see exactly how many bytes you saved.
TL;DR: Paste JSON6 and get a single-line version with comments, indentation and trailing commas removed. The byte counts shown are UTF-8 bytes, so you can see the real saving. Because the minifier emits JSON6 (bare keys, no quotes around simple identifiers), it is often smaller than minified JSON. Everything runs locally.
Minify JSON6 Online
The sample has comments and generous indentation. Watch the byte counter as you edit.
Private by design: everything runs locally in your browser using the reference json-6 parser. Your text is never uploaded, logged or sent to any server, and it is gone when you close the tab.
How the Minifier Works
The minifier parses your text with JSON6.parse and writes it back with JSON6.stringify(value, null, 0, { sortKeys }). A space of 0 produces one line with no whitespace between tokens. Comments, indentation, newlines and trailing commas are gone because none of them survive parsing.
The result is still JSON6, not JSON. Simple keys lose their quotes, which saves two bytes per key, so a minified JSON6 document is usually a little smaller than its minified JSON twin. If another program must read the output with JSON.parse, use the converter instead, which produces strict JSON.
Things to Know Before You Minify
- Numbers are written in decimal.
0xFFFFbecomes65535, which is shorter for some values and longer for others, so the byte counter may report that the output grew. - Strings are always double-quoted; a back-tick string that was shorter to write may get longer.
- Object members whose value is
undefinedare dropped;undefinedarray elements are kept. - Keys are sorted unless you choose "Keep original order".
- A real minifier for transport should also be followed by gzip or Brotli. Compression does far more than whitespace removal and works fine on JSON6.
Example
{ // retries retries: 3, hosts: [ 'a.example', 'b.example', ], }minifies, with original key order kept, to:
{retries:3,hosts:["a.example","b.example"]}FAQ
Is my data sent to a server?
No. Everything runs in your browser; nothing is uploaded.
Is the output valid JSON?
Usually not, because keys are unquoted. It is valid JSON6. Use the converter for strict JSON.
Why did my file get bigger?
JSON6 output always uses double quotes and decimal numbers. If your input used short forms like 0xF or single-character escapes, the canonical form can be longer.
Does it keep comments?
No. Removing comments is part of minifying.
Keep Going
Re-expand the output with the formatter, or read how to load JSON6 in the browser.