Side by side
Obfuscar vs R8
Both stand on code obfuscation software. Which one you can start free with, which one lets you read the code, and what each costs once you pay.
Free plan LinuxMacWindows
Pick Obfuscar if you need a free, command-line way to make .NET assembly metadata harder to follow across Linux, macOS, or Windows. Look elsewhere if you need obfuscation to prevent determined reverse engineering or must store confidential strings in assemblies.
Visit Obfuscar Free plan APILinux
Choose R8 if you need Java bytecode optimization for Android DEX, especially within an Android Gradle Plugin build. Look elsewhere if your workflow depends on full command-line compatibility with ProGuard, or if longer builds and harder debugging are unsuitable.
Visit R8The facts
| Obfuscar | R8 | |
|---|---|---|
| Free plan | Yes | Yes |
| Open source | Not published | Not published |
| Runs on | Linux, Mac, Windows | API, Linux |
| Lowest paid plan | Free or on request | Free or on request |
| Plans published | 1 | 1 |
| Maker | Not published | Not published |
| Website | github.com | r8.googlesource.com |
| On code obfuscation software | #6 of 34 | #10 of 34 |
Obfuscar: what it does well
- Free under the MIT license.
- Runs on Linux, macOS, and Windows.
- Renames multiple kinds of .NET assembly metadata.
- Shorter generated names can reduce executable size.
- Available as a NuGet package and .NET Global Tool.
What to know first
- Obfuscation does not stop determined reverse engineering.
- String hiding is reversible and adds a small performance cost.
- Version 3.0 beta rejects relative paths and variable placeholders.
- Malformed or malicious assemblies can cause crashes or hangs.
R8: what it does well
- Removes unreachable code and can inline methods and merge classes.
- Shortens class, field, and method names to reduce DEX size.
- Optimizes resources with Android Gradle Plugin 8.12.0 and later.
- Can output Android DEX or Java class files.
- Included in Android Gradle Plugin, with version override options.
What to know first
- The listed platform is Linux.
- Optimization can increase build time and make debugging harder.
- The command line does not support every ProGuard usage; keep rules require a file.