Veil is an obfuscator for JAVA applications.

Developers

Social Media

Legal

Documentation


Quick Start (Standard Browser Edition)

Protect a compiled JAR file (.jar) in three steps on the free Home Workbench:

  1. Choose the compiled .jar in the Target JAR File field.
  2. Pick the passes your deployment needs.
  3. Click Protect JAR File and download the result.

Veil Cloud Pipeline & CI/CD API

The CI/CD API is free and needs no account:

  1. Create a token at /token.jsp by verifying your e-Mail.
  2. Call POST /api/v1/protect with Authorization: Bearer veil_live_....

Add native_compilation=true and native_compilation_platform=... to the query string to build a native image.

curl -fsSL -X POST "https://veil-obfuscator.com/api/v1/protect?\ name_obfuscation_classes=true&name_obfuscation_fields=true&\ name_obfuscation_methods=true&string_encryption=true&\ constant_encryption=true&flow_obfuscation=true&\ reference_obfuscation=true" \ -H "Authorization: Bearer veil_live_..." \ --data-binary @build/libs/app.jar \ -o build/libs/app-protected.jar
Veil Obfuscator and its runtime are proprietary. Do not reverse engineer them. See License.

Query Parameters

A parameter turns its pass on or off. A parameter that is left out keeps the default of the pass: the passes the balanced profile carries are on, the rest are off.

Naming
name_obfuscation_classes, name_obfuscation_fields, name_obfuscation_methods, name_obfuscation_annotations Give the members of the program new names, group by group.
name_obfuscation_packages Give the packages of the program new names and spread the classes over them, so that the JAR file does not show which classes were in a package together.
name_obfuscation_kept_packages Packages that keep their names, for example com/example/api.
access_reduction Mark the members that the virtual machine does not reach by name as synthetic.
varargs_conversion Give the last parameter of an internal method an array type and build that array at every call site.
parameter_type_widening Turn every integer parameter of an eligible method into a long, convert it back at entry and pass a long from every caller.
method_parameter_changes Pass the decryption key as an extra argument.
name_obfuscation_prefix A prefix every new name starts with.
name_obfuscation_alphabet ascii or non-ascii: the characters the new names are built from.
name_obfuscation_mixed_case_classes Change the case of the letters in a class name.
name_obfuscation_unique_classes Give every class of the JAR file a name no other class has.
name_obfuscation_unique_methods Give every method a name no other method has.
name_obfuscation_aggressive_methods Rename an overriding method of an outside type when the program never hands the object to that type.
name_obfuscation_legal_identifiers Keep the new names parseable as Java source.
name_obfuscation_randomize Take the names from the clock instead of the seed.
Encryption
string_encryption Encrypt the strings of the code, of constant fields and of concatenation recipes; drop the annotations the runtime does not show with their strings.
constant_encryption Replace the numeric constants with calculations.
string_encryption_strength normal, aggressive, flow or enhanced; enhanced encrypts the strings with DES.
constant_encryption_strength normal or aggressive for the integer constants.
wide_constant_encryption_strength normal or aggressive for the long and double constants.
Flow
program_rebuild, program_rebuild_rounds, program_rebuild_piece Take the program apart and put it together again, so that the shape of the original is gone.
reference_obfuscation Resolve the calls and the field reads through a lookup table.
dynamic_invocation Route the calls through bootstrap call sites.
reflective_access Turn sensitive calls into reflective lookups.
flow_obfuscation Harden the control flow.
exception_obfuscation Name a supertype in the throws lists, the handler tables and the thrown objects.
exception_type_concealment Rename the throwables of the program that are never caught and take them out of the throws lists.
flow_obfuscation_strength light, normal or aggressive.
exception_obfuscation_strength light or heavy.
method_parameter_changes_strength none, normal, random or flow: extra parameters that carry keys and decoys.
package_collapse Move every class into one package.
helpers_local Keep the helpers beside the class they serve.
keep_package_access Keep the classes that reach each other in one package instead of widening the access.
Metadata
optimization Fold the constant expressions.
debug_info_removal Remove the source file, the line and local variable tables, the parameter names and the generic signatures.
line_number_obfuscation Fill the line number tables with offsets that lead nowhere.
Hardening
failure_path_hardening Catch everything a method throws and throw one general failure, unless the program inspects the failure.
decoy_class_injection Add decoy classes to the JAR file.
filler_class_injection Add filler classes to the JAR file.
integrity_checking Stop the JAR file at startup when a class byte was changed.
expiry Stop the JAR file after this many days.
native_compilation, native_compilation_platform Compile the methods to native code for the given systems.

native_platform takes the systems separated by commas: linux-x86_64, linux-aarch64, windows-x86_64, macos-x86_64 and macos-aarch64. Every system gets a library of its own, and the machine that runs the JAR file takes the one that fits it. Without the parameter the library is built for the system of the server.

Response Headers

The response carries the obfuscated JAR file. The headers count what the run did:

x-report-classes, x-report-renamed-classes, x-report-moved-classes, x-report-renamed-packages, x-report-renamed-members The classes of the JAR file and the names that changed.
x-report-renamed-resources, x-report-renamed-natives, x-report-changed-literals The resources and native libraries that got a new name and the paths in the code that were changed with them.
x-report-encrypted-strings, x-report-strings-in-code, x-report-strings-in-fields, x-report-strings-in-recipes, x-report-strings-in-annotations, x-report-protected-numbers, x-report-unprotected-numbers The strings by their home, and the numbers that were changed and the numbers that stayed because the code of their method was full.
x-report-protected-parameters, x-report-widened-parameters, x-report-changed-parameters, x-report-varargs-methods The methods whose parameters were widened, the parameters that changed their type, the methods that got a key parameter and the methods that became variable arity.
x-report-reflected-lookups, x-report-protected-references, x-report-dynamic-calls, x-report-reflective-calls, x-report-hardened-methods The calls, the field reads and the methods that were rewritten.
x-report-protected-exceptions, x-report-hidden-exceptions, x-report-crashed-methods The exception handling that was rewritten.
x-report-hidden-members, x-report-folded-constants, x-report-trashed-methods, x-report-stack-trace-names The members that were hidden, the folded constants, the scrambled line tables and the names of the old build.
x-report-junk-classes, x-report-trash-classes The decoy and filler classes that were added to the JAR file.
x-report-merged-classes, x-report-split-methods, x-report-inlined-calls, x-report-shuffled-values, x-report-frames-failed The classes that moved into host classes, the methods that were cut, the calls that were inlined, the values that went through a helper and the methods that kept their code because their frames could not be worked out.
x-report-native-methods, x-report-native-systems The methods that were compiled to native code and the systems the library was built for.
x-report-time-ms The time the run took.
x-names Points at the names of the old build. It is there when the names were kept.

Recommended Pass Configuration

Passes When to Enable
Name Obfuscation + Reflection Recovery For every standalone application. Keep Reflection Recovery on when the code uses Class.forName or framework reflection. Add the public API packages to Package Exclusions when you build a library JAR.
String Encryption + Constant Encryption + Method Parameter Changes Hides license URLs, protocol constants, SQL queries and error messages from a static scan. Method Parameter Changes keeps the decryption key out of the constants.
Reference Obfuscation + Dynamic Invocation + Reflective Access Hides the call graph and the field reads behind runtime lookup tables and bootstrap call sites.
Flow Obfuscation + Optimization + Access Reduction + Varargs Conversion + Line Number Obfuscation Makes the control flow hard to follow and replaces the source line numbers with decoy offsets.
Exception Obfuscation + Exception Type Concealment + Failure Path Hardening + Stack Trace Restoration Hides the catch and throw types, and keeps the stack traces translatable back to the names of the build.
Native Compilation Runs the methods without the bytecode interpreter. The library is built for the systems named by native_platform, and the machine that runs the JAR file takes the library that fits it.
Integrity Checking + Expiry Stops a changed JAR file at startup and stops the JAR file after the number of days you set.

Platform & JVM Compatibility

Obfuscated JAR files stay standard JVM bytecode. They run on Windows, macOS and Linux, on Java 8 through Java 25, with no external agent.

Execution Command:
java -jar your-protected-application.jar