Free Java™ Bytecode Obfuscator and Shrinker

A monitor displaying partial obfuscated and un-obfuscated code

Secure and compact code

For Everyone
For Techies

yGuard is a free and open source Java bytecode obfuscator and shrinker. By obfuscation you can convert your compiled code into one that is difficult to understand for humans. This way you can secure it from unwanted access.
At the same time it shrinks the code size drastically, which helps to reduce the startup time of the application.

yGuard is a free and open source Java bytecode obfuscator and shrinker. It can process .class files compiled by any stable JDK (up to Java 17). yGuard provides functionality to rename classes, interfaces, methods etc. in order to scramble the resulting archive, making it much harder to reverse-engineer.
Additionally yGuard offers code-shrinking functionality which reduces archive size (faster startup) by removing dead code.

What's New?

Check out the changelog.

Free Download

What to expect on this page

Fully Open Source

Because we want to give something back to the community!
Open Source is an essential part of modern software development and helps us to create better software every day. We want to be part of that movement! That is why we made yGuard fully open source.

Why use yGuard?

Name Obfuscation

yGuard protects your .class files from reverse engineering by replacing package, class, method, and field names with inexpressive characters. If afterwards the obfuscated .class files are decompiled, it will be extremely difficult to derive the original purpose of the obfuscated code entities.

Code Shrinking

yGuard drastically reduces the size of the input Jar files if your application does not use all of the contained bytecode. This reduces the startup time of your application.

The shrinking engine analyzes the bytecode of all input Jar files in order to determine which code entities can not be reached from a set of given code entry points. These obsolete code fragments (either entire classes or single methods and fields) will then be removed by yGuard. If you use any third party libraries, you will probably benefit a lot from the yGuard shrinking engine, since applications usually do not use all of the functionality provided by an external library and a large fraction of the contained bytecode and resources can be safely removed.

yGuard features

Easy setup

yGuard is an Ant task! As an Ant task, yGuard can be seamlessly integrated into your deployment process in a multitude of build systems such as Ant, Maven and Gradle

Advanced shrinking

yGuard provides elaborate code shrinking functionality through dependency analysis.

Configureable / secure code

yGuard provides highly configurable name obfuscation that will protect your intellectual property from reverse engineering.

Open Source

yGuard is fully open source! Contrary to expensive commercial products yGuard is and always will be free.

yGuard offers a powerful and easy to use XML syntax that allows the effortless definition of code entities e.g. based on pattern sets or inheritance.
yGuard will correctly obfuscate and shrink programs that depend on external libraries.
yGuard can automatically rename and adjust textual resource files according to the obfuscation scheme.
yGuard can scramble and unscramble or shrink line number table information. This means that debugging an obfuscated program is still achievable without weakening the obfuscation.
yGuard can create patches! During each obfuscation run, yGuard produces XML output that can be used to create subsequent patches of already deployed obfuscated applications.
more features

Free license

Free & Open Source

Because we want to give something back to the community!
Open Source is an essential part of modern software development and helps us to create better software every day. We want to be part of that movement! Thats why we made yGuard fully open source.

You can find the source code on GitHub.

Technical information


To run the yGuard software, you need JDK 1.7.x or greater and Ant 1.5.x or greater (it might be compatible with earlier versions of either software, this has not been tested, however).

Java compatibility

yGuard is compatible with all published Java versions (up to Java 17).
However, the functionality may vary slightly depending on the version used. The documentation includes a detailed description of the supported features for the different versions. There is also a section regarding 3rd party JVM support if you intend to use yGuard with something other than Java.


Have more questions?
Find helpful information here:

Download yGuard

Getting started

Step 1

yGuard is available for any of the major build tools in the Java ecosystem. The software is provided as on Maven Central. Additionally the archives are also available on GitHub.

Step 2

Before using yGuard you will need to set it up for your favorite build tool, but no problem there. yGuard comes with exhaustive documentation including all the necessary steps to get you started. If you seek to solve a complex problem, we provide additional examples.

Step 3

Once you have downloaded and configured yGuard, you can enjoy the additional security provided to your product. Free of charge, because yGuard is open-source!

Download yGuard

The enterprise solution for data visualization and graph drawing

Integrable into your application
Suitable for any use case
Highly customizable to fit your needs
Compatible with any type of data

Why, how, what? —
Just ask the diagramming experts!

Our team is happy to advise you – no strings attached. Let's talk about your project and find the perfect solution for your needs!

E-mail: hello@yworks.com

The data you enter will only be used to contact you regarding your request.
Learn more in our privacy policy.