JSON Minifier
Example
Input:
{
"name": "Ali",
"age": 30
}Output:
{"name":"Ali","age":30}About this converter
Minifying by deleting whitespace with a text tool is risky — spaces inside strings are data. This minifier parses the JSON first (rejecting invalid input with the parser's position), then re-serialises it compactly, which guarantees the output is the same document with only formatting removed. Number formatting follows the parsed value (1e3 becomes 1000, trailing zeros drop), and key order is preserved as parsed. The result is what you want for embedding JSON in size-sensitive places: tokens, config blobs, cache keys and compact API fixtures.
Frequently Asked Questions
Is minified JSON always smaller?
For the same document, yes — whitespace is pure overhead here. Pretty-printing exists for humans; minifying is for machines and storage.
Will it remove spaces inside my strings?
Never — parsing protects string contents; only structural whitespace between tokens is removed.