What is Refractor?
Refractor is a powerful Dart kernel (.dill) obfuscation tool that protects your compiled Dart applications from reverse engineering and static analysis. It compiles your Dart code to kernel bytecode, applies configurable obfuscation transformations, and outputs production-ready executables, AOT snapshots, JIT snapshots, or kernel files.
Refractor is in early stages of development. Real impact at the generated binary may differ from expectations.
Key Features
Identifier Renaming
Rewrites class, method, and field names to short meaningless identifiers
String Encryption
Replaces string literals with XOR-encoded byte arrays and runtime decoder
Dead Code Injection
Inserts unreachable branches to hinder static analysis and decompilers
Multiple Build Targets
Output as executable, AOT snapshot, JIT snapshot, or kernel file
Symbol Map
JSON mapping of obfuscated names back to originals for debugging
Configurable Exclusions
Glob-based patterns to exclude generated files and specific libraries
How It Works
Refractor operates in four stages:Apply Obfuscation Passes
Configured passes transform the kernel AST: renaming identifiers, encrypting strings, and injecting dead code
Use Cases
- Mobile app protection — Obfuscate Flutter apps before release to app stores
- CLI tool distribution — Protect proprietary business logic in command-line tools
- Server-side code — Harden Dart backend services against reverse engineering
- Library distribution — Protect algorithms and IP in published packages
Quick Example
Next Steps
Installation
Install Refractor and set up your environment
Quickstart
Build your first obfuscated application in minutes
Commands
Explore the command-line interface
Configuration
Configure obfuscation passes and options