JSON Formatter
Format and beautify JSON with your choice of indentation, and find syntax errors by line and column.
Runs in your browser. Your input stays on your device.
Remove every space, tab, and line break that JSON does not need, without touching your data. See the original size, the minified size, and how much smaller it gets.
Opens a file from your device. The file is read in your browser and is not uploaded.
Showing a large file in the editor can make the page slow or unresponsive for several seconds.
0 characters · 0 B
0 characters · 0 B
Privacy: This tool runs in your browser. Your input is processed on your device and is never uploaded to a server.
Indented JSON minified. Spaces inside the "motd" string are kept. The result is 53 bytes (18.8%) smaller.
{
"service": "orders-api",
"version": "2.3.1",
"port": 8080,
"features": {
"rateLimit": true,
"maxRequestsPerMinute": 120
},
"allowedOrigins": [
"https://app.example.com",
"https://admin.example.com"
],
"motd": "Scheduled maintenance at 02:00 UTC"
}{"service":"orders-api","version":"2.3.1","port":8080,"features":{"rateLimit":true,"maxRequestsPerMinute":120},"allowedOrigins":["https://app.example.com","https://admin.example.com"],"motd":"Scheduled maintenance at 02:00 UTC"}No. Only whitespace between tokens is removed. Spaces inside string values, key order, repeated keys, and every digit of every number stay as they were. The single exception is a byte order mark at the very beginning of the input, which is dropped.
That depends on how much indentation and how many line breaks the original contains. A 5 MB test file indented with 2 spaces shrank by about 32%, while JSON that is already compact may not change at all. The summary shows the exact saving for your input.
Compression already removes most of the cost of repeated whitespace, so the saving on the wire is much smaller than the raw numbers here suggest. Minifying still pays off when JSON is stored on disk, embedded in a web page or a bundle, or sent somewhere without compression.
Yes. Minifying removes nothing but whitespace, so no information is lost. Paste the minified text into the JSON Formatter to indent it again.
Entirely inside this browser tab. The minifier never sends your input anywhere, so the JSON you paste never leaves your device.
Article Published
Format and beautify JSON with your choice of indentation, and find syntax errors by line and column.
Check JSON for errors with line, column, and code context, and catch duplicate keys and unsafe large numbers.
Convert CSV or TSV to JSON with delimiter detection, header handling, and optional, lossless type detection.