About JSON Minifier
Indentation makes JSON easy to read and wasteful to send. Paste a document and it comes back on a single line with every space between tokens removed, ready for an environment variable, a request body, a fixture file or a database column. Spaces inside strings are data, so they stay. Under the result you see the size before and after, in UTF-8 bytes, and the share that was saved.
The document is validated on the way: if it is not JSON, you get the line and column where it breaks instead of a broken result. Numbers keep the exact digits you wrote.
How it works
- The text is read by a strict JSON parser, which stops at the first mistake and says where it is.
- The document is written back out with nothing between its tokens: no spaces, no tabs, no line breaks. Numbers and the order of keys are copied unchanged. Strings keep their content, but an escape that JSON does not need, such as \u00e9 or \/, is written as the character itself, which is never longer.
- The sizes compare the UTF-8 bytes of your input and of the result, the figure that matters when the JSON is stored or sent.
Questions
How much smaller will my JSON get?
It depends on the indentation. A document indented with two spaces often loses a fifth to a third of its size, one indented with four spaces even more. The exact saving for your document is shown under the result.
Does minifying change the data?
No. Only the whitespace between tokens is removed, and key order and numbers stay exactly as written. Strings hold the same text, though an unneeded escape such as \u00e9 is written as the plain character é. The one exception is a key repeated in the same object: JSON keeps only its last value, and a warning says where the repeat was.
Is minified JSON the same as compressed JSON?
No. Minifying removes characters that carry no meaning, and the result is still plain JSON that any program reads. Compression such as gzip goes further but produces binary data that must be decompressed first. Servers often do both.
Is there a size limit?
Documents up to 5 MB of text. Everything happens in this browser tab, so nothing is uploaded.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.