Skip to content
FileSlimmer
Tools
Guides

Code tools

These three tools parse your source, rewrite it and print it back out. What they never do is run it. That distinction is the whole safety model here, and it is enforced in the code rather than promised in a sentence.

Your code is parsed, never executed

A minifier has to understand your source, which means parsing it into a syntax tree and printing that tree back out. It does not need to evaluate anything, and this one does not: there is no eval, no dynamic Function, and no preview that runs your script.

That matters most for SVG. An SVG is an executable document — it can carry scripts, event handlers and javascript: URLs. Every one of those is stripped, twice: once by the optimiser's own rule and once more by an independent pass that runs afterwards, because a single filter with a single bug is not a safety model.

What minification actually saves

Removing whitespace and shortening local names typically takes a third off raw source. Most of the remaining win comes from your server's compression, not from the minifier, so a minified file that is then gzipped is the realistic comparison — not the raw byte count.

Imports are left alone

An @import in CSS is preserved as text or removed on request. It is never followed: fetching whatever it points at would mean this page made a request on your behalf about a file you pasted in, which is exactly what the rest of the site is built not to do.