ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier. It detects and removes unused classes, fields, methods, and attributes. It optimizes bytecode and removes unused instructions. It renames the remaining classes, fields, and methods using short meaningless names. Finally, it preverifies the processed code for Java 6 or for Java Micro Edition. The resulting jars are more compact and more difficult to reverse-engineer. Advantages of ProGuard compared to other Java shrinkers and obfuscators are compact template-based configuration, memory efficiency, and speed.
| Tags | Software Development Code Generators Build Tools |
|---|---|
| Licenses | GPL |
| Operating Systems | OS Independent |
| Implementation | Java |
Recent releases


Changes: All processing steps have new features. Notably, the optimization step now performs class merging, static single assignment analysis, simplification of tail recursion calls, and a number of new peephole optimizations. The obfuscation step now accepts optional dictionaries for class names and package names. Resource file names are adapted in a more general way. Furthermore, various bugs have been fixed.


Changes: The data flow analysis in the optimization step has been refined. Other changes are mostly bugfixes for the optimization step and for the obfuscation step. Notably, the optimization step now avoids increasing the size of methods beyond certain bounds, in order not to upset the HotSpot JIT compiler. The documentation and examples have been updated.


Changes: The shrinking step now correctly processes default annotation element values. The optimization step has received a number of bugfixes. Notably, it now avoids stack overflows when analyzing complex methods. The obfuscation step has been fixed to handle potentially ambiguous non-primitive constants in interfaces. The preverification step now handles some less common code constructs. The documentation and examples have been updated.


Changes: This release also performs pre-verification for Java Micro Edition and Java 6. The optimization step propagates constant fields and arguments, inlines methods, and supports more than 250 new peephole optimizations. The obfuscation step has more options for repackaging classes and for processing resource files. The GUI provides tool tips on all options. Configuration is more flexible, with additional wild cards and the ability to use annotations. The program provides additional feedback on potential configuration problems. The documentation and examples have been updated.


Changes: This version fixes minor problems. It accepts mixed-case input class names when -dontusemixedcaseclassnames is specified. The optimization step now handles some special constructs compiled by the Eclipse compiler, and switch statements with unreachable cases. Identically named resource files are no longer merged in the output. The documentation and examples have been updated.
- All comments
Recent commentsAll problems fixed with version 4.0.1
> Unfortunately, we need to stick with
> version 3.6 because every new version
> we've tried caused our application to
> behave incorrectly (e.g. menus did not
> open) or to throw some exceptions at the
> application start (although we don't use
> reflection).
With version 4.0.1 all these problems are fixed. Thanks, Eric, for the excellent work!
Good tool, but...
We use ProGuard since a couple of years and are very happy with it. It provides good obfuscation for zero price.
Unfortunately, we need to stick with version 3.6 because every new version we've tried caused our application to behave incorrectly (e.g. menus did not open) or to throw some exceptions at the application start (although we don't use reflection). The bad thing is, that finding such bugs is very hard without (major) knowledge of the byte-code internals. Sending unobfuscated application code over the internet is also not a good choice.
It works for me...thanks!
This package shrunk my jar to 1/3 its size, eliminated unused methods and gave the rest names like a, b, c, etc. Just what I needed. Best of all, thanks to the wizardly GUI builder, I was able to do this in practically zero time.
I like the way the GUI builder is a transparently clean front-end for the underlying ant script (which is quite readable), and how well the various defaults were chosen. There's great documentation, too.
Even if you don't need an obfuscation tool, the code shrinkage and method elimination gives your Java applications many of the advantages associated with languages like C.
Have only used it on a small application so far, but I very much liked what I saw...Thanks for creating what I expect will be an important addition to my Java toolkit going forward.