The difference between a minifier and an obfuscator

JS Minifier and JS Obfuscator are 2 terms you may face while surfing the internet or do some programming jobs. This post shows you the difference between them.

An obfuscator will transforms your original JavaScript source code into a new file that’s harder to understand, copy, re-use and modify. It’s like a way to hide or compile your source code to prevent someone else reusing/modifying it.

A minifier is a tool to transform your source code into a more lightweight version to save loading time and bandwidth between server and user’s browsers.

Most of time, it’s easy to re-format a minified text to a well-formed text. So basically, we do not use a minifier to hide our code.

An obfuscator rarely reduces the size of source code, but usually make it bigger.

So, both are tools to transform source code to another version without changing the functionalities of the code.

An obfuscator is to hide your source code, a minifier is to reduce the size of your source code.