BASTION
BY TEXAS
B
JVM bytecode fortress
Java bytecode obfuscator — rename, shrink, encrypt, protect.
DOWNLOAD GITHUB
↓ SCROLL ↓

Features

Six layers of protection. Everything a JVM obfuscator needs — and more.

Renaming

Classes, methods and fields get random names. Hierarchy-aware: doesn't break inheritance or interfaces.

Shrinking

Dead code is removed. Unused classes, methods and fields disappear from the output JAR.

String Encryption

Every string constant is encrypted with XOR and decrypted at runtime. No more readable text in bytecode.

Control Flow

Fake conditional jumps are injected into every method. Decompilers spit out nonsense.

Metadata Cleanup

SourceFile, LineNumberTable, local variable names, generic signatures — all gone.

Self-Obfuscation

Bastion can obfuscate itself. Bootstrap-tested, self-hosted, recursively protected.

How it works

Three steps. No configuration hell, no Gradle plugins, no XML.

1

Build your JAR

Compile your Java project the usual way. Bastion takes a JAR and returns a JAR.

2

Run Bastion

Pass the input JAR, output path and keep-rules. Either via CLI or the GUI.

3

Ship it

Get an obfuscated JAR plus a mapping file for de-obfuscating stack traces.

bastion obfuscate myapp.jar myapp-obf.jar --config keep.txt [shrink] removed classes=6 methods=15 fields=9 Bastion: myapp.jar -> myapp-obf.jar Mapping: myapp-obf.map

Screenshot

Dark theme, red accent, full-screen GUI.

Bastion GUI

Download

WINDOWS (.exe) ALL RELEASES