Before (JSON)
{
"name": "Ada",
"age": 36,
"roles": [
"admin",
"author"
]
}The JSON Minifier takes the spacing out of a JSON text and nothing else. It works on the text itself rather than on parsed values, so long ids, decimals such as 1.50, exponents, repeated keys, the order of keys and every escape come out exactly as they went in. Your own text stays in its pane; the minified text follows it as you type, with the size before and after in bytes and the size after gzip.
Every result is read back and compared with what you pasted before it is shown. Anything that changes more than spacing is a setting that is off to start with, and the page says what it did: comments and trailing commas that were taken out, numbers that were written shorter, a key that appears twice, values that were left out.
Minified JSON is what goes into a request body, a configuration value, a database column, a message on a queue or a string in code. Where a server compresses its replies, gzip already removes most of the spacing, so the page shows both figures and the Report view says where the remaining bytes are: usually in key names repeated in every record, which a minifier cannot shorten.
JSON (JavaScript Object Notation) is a text format built from objects of key and value pairs, lists, strings, numbers, true, false and null. Spaces, tabs and line breaks between those pieces carry no meaning, which is why removing them never changes the data.
Paste JSON, drop a .json, .jsonc or .jsonl file, or open one with Upload. Your text stays in the left pane and is never overwritten.
The minified text appears on the right as you type, with its size, the saving measured against what you pasted, and the size after gzip.
The footer says "same data" once the result has been read back and compared with your text. A notice explains anything that is not plain spacing.
Report shows what was taken out and what is left. Use in code writes the result as a string for your language or a terminal.
Copy and Download give exactly what the pane shows. An uploaded orders.json downloads as orders.min.json.
{
"name": "Ada",
"age": 36,
"roles": [
"admin",
"author"
]
}{"name":"Ada","age":36,"roles":["admin","author"]}{
"user": {
"id": 1,
"active": true
}
}{"user":{"id":1,"active":true}}[
{
"id": 1,
"name": "Widget"
},
{
"id": 2,
"name": "Gadget"
}
][{"id":1,"name":"Widget"},{"id":2,"name":"Gadget"}]{
"id": 9007199254740993,
"price": 1.50,
"ratio": 1.0,
"note": "Caf\u00e9"
}{"id":9007199254740993,"price":1.50,"ratio":1.0,"note":"Caf\u00e9"}{
"title": "Hello World",
"tags": [ "a b", "c d" ]
}{"title":"Hello World","tags":["a b","c d"]}{
"a": {
"b": {
"c": [
1,
2
]
}
}
}{"a":{"b":{"c":[1,2]}}}The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Paste JSON on the left; the minified text appears on the right as you type.
Only spacing is removed. Numbers, escapes, repeated keys and key order stay as written.
Your own text is never overwritten.
Minified: the compact text, with the size before and after and what was saved.
Report: what was taken out, the check that it is the same data, and what the rest is made of.
Use in code: the result as a string for JavaScript, Python, Java, Go, C#, PHP, curl or .env, to copy or download.
With the defaults nothing but spacing changes.
Sorted keys use the order of jq -S and Python's sort_keys; switching it off brings your order back.
Shorter numbers, shorter escapes, a width limit and leaving out nulls and empties are all optional, and each says what it did.
A dot marks every setting that is not at its default; Defaults puts them all back.
Comments and trailing commas are taken out and listed.
A file with one value per line (JSON Lines) is minified line by line.
A missing comma, single quotes, bare keys and Python's True, False and None can be repaired with one click.
Everything runs in your browser; nothing is uploaded.
The text is kept in this browser for the next visit unless you switch that off in the settings.
The JSON Minifier takes the spacing out of a JSON text and nothing else. It works on the text itself rather than on parsed values, so long ids, decimals such as 1.50, exponents, repeated keys, the order of keys and every escape come out exactly as they went in. Your own text stays in its pane; the minified text follows it as you type, with the size before and after in bytes and the size after gzip.
Every result is read back and compared with what you pasted before it is shown. Anything that changes more than spacing is a setting that is off to start with, and the page says what it did: comments and trailing commas that were taken out, numbers that were written shorter, a key that appears twice, values that were left out.
Minified JSON is what goes into a request body, a configuration value, a database column, a message on a queue or a string in code. Where a server compresses its replies, gzip already removes most of the spacing, so the page shows both figures and the Report view says where the remaining bytes are: usually in key names repeated in every record, which a minifier cannot shorten.
JSON (JavaScript Object Notation) is a text format built from objects of key and value pairs, lists, strings, numbers, true, false and null. Spaces, tabs and line breaks between those pieces carry no meaning, which is why removing them never changes the data.
Paste JSON, drop a .json, .jsonc or .jsonl file, or open one with Upload. Your text stays in the left pane and is never overwritten.
The minified text appears on the right as you type, with its size, the saving measured against what you pasted, and the size after gzip.
The footer says "same data" once the result has been read back and compared with your text. A notice explains anything that is not plain spacing.
Report shows what was taken out and what is left. Use in code writes the result as a string for your language or a terminal.
Copy and Download give exactly what the pane shows. An uploaded orders.json downloads as orders.min.json.
{
"name": "Ada",
"age": 36,
"roles": [
"admin",
"author"
]
}{"name":"Ada","age":36,"roles":["admin","author"]}{
"user": {
"id": 1,
"active": true
}
}{"user":{"id":1,"active":true}}[
{
"id": 1,
"name": "Widget"
},
{
"id": 2,
"name": "Gadget"
}
][{"id":1,"name":"Widget"},{"id":2,"name":"Gadget"}]{
"id": 9007199254740993,
"price": 1.50,
"ratio": 1.0,
"note": "Caf\u00e9"
}{"id":9007199254740993,"price":1.50,"ratio":1.0,"note":"Caf\u00e9"}{
"title": "Hello World",
"tags": [ "a b", "c d" ]
}{"title":"Hello World","tags":["a b","c d"]}{
"a": {
"b": {
"c": [
1,
2
]
}
}
}{"a":{"b":{"c":[1,2]}}}The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Paste JSON on the left; the minified text appears on the right as you type.
Only spacing is removed. Numbers, escapes, repeated keys and key order stay as written.
Your own text is never overwritten.
Minified: the compact text, with the size before and after and what was saved.
Report: what was taken out, the check that it is the same data, and what the rest is made of.
Use in code: the result as a string for JavaScript, Python, Java, Go, C#, PHP, curl or .env, to copy or download.
With the defaults nothing but spacing changes.
Sorted keys use the order of jq -S and Python's sort_keys; switching it off brings your order back.
Shorter numbers, shorter escapes, a width limit and leaving out nulls and empties are all optional, and each says what it did.
A dot marks every setting that is not at its default; Defaults puts them all back.
Comments and trailing commas are taken out and listed.
A file with one value per line (JSON Lines) is minified line by line.
A missing comma, single quotes, bare keys and Python's True, False and None can be repaired with one click.
Everything runs in your browser; nothing is uploaded.
The text is kept in this browser for the next visit unless you switch that off in the settings.
It is minified in this browser as you type. Nothing is sent anywhere.
Paste JSON here
.json, .jsonc and .jsonl files, up to 10 MB
Minified JSON appears here as you type