API
Obfuscate assemblies from CI, build scripts, or your own tooling. Pro plan required.
Build client for CI
Download the .NET 8 build client (1.45.0) to upload one DLL or EXE from a build script. Requires Pro and the .NET 8 runtime. This client uses our hosted API; your assembly is uploaded to FreeObfuscator.
Set FREEOBFUSCATOR_API_KEY through your CI secret store, then run:
dotnet FreeObfuscator.BuildClient.dll MyApp.dll MyApp.protected.dll --encrypt-strings --control-flow
The client refuses to overwrite files, validates the returned managed assembly and returns a nonzero exit code on failure. It sends no automatic retries. Use --include-map with an output ending in .zip to keep the protected binary and private map together. Always run your application's tests against the protected output before publishing.
dotnet FreeObfuscator.BuildClient.dll MyApp.dll MyApp.build.zip --encrypt-strings --include-map dotnet FreeObfuscator.BuildClient.dll --decode MyApp.map.txt crash.txt decoded.txt
Extract the ZIP locally and store the map privately with that exact release; never distribute it to customers. Offline decoding needs no API key and sends no map or crash log over the network.
POST /api/v1/obfuscate
Upload a single .NET assembly (up to 100 MB). Responds with the obfuscated binary as application/octet-stream.
One assembly per request. To protect several, call it once per file — the calls are independent and can run in parallel. The CI/CD guide has ready-made GitHub Actions and Azure Pipelines steps.
Headers
X-Api-Key: your Pro API key (fo_live_…)
Form fields
file: the .dll or .exe (multipart/form-data)renamePublic:true/false— obfuscate public names. Applied only to assemblies with an entry point (applications); ignored for libraries.encryptStrings:true/false— encrypt string literals so URLs and messages are not readable in a decompiler.controlFlow:true/false— reorder method bodies into tangled goto flow. Methods with exception handlers are left unchanged.hideReferences:true/false— route calls to external static methods through generated proxies so the real API is hidden at the call site.virtualize:true/false— compile methods you mark with a[Virtualize]attribute (or[Obfuscation(Feature="virtualization")]) into a private VM; only marked methods are affected. Much slower at runtime, so reserve it for a few critical methods.integrityCheck:true/false— add a tamper-detection self-check over the virtualized bytecode, coupling the virtualized methods so patching the compiled output breaks them rather than running altered logic. Only has an effect together withvirtualize.antiIldasm:true/false— add SuppressIldasmAttribute to block the legacy ildasm tool.includeMap:true/false— return a.zipcontaining the obfuscated assembly plus a.map.txtrename map, instead of the raw binary. The map lets you decode crash stack traces back to your original names; it is generated in memory and never stored on our servers. The responseContent-Typeisapplication/zipwhen this is set.
Examples
cURL
curl -X POST https://freeobfuscator.com/api/v1/obfuscate \ -H "X-Api-Key: fo_live_xxxxxxxxxxxxxxxx" \ -F "[email protected]" \ -F "renamePublic=true" \ -F "encryptStrings=true" \ -o MyApp.obfuscated.exe
PowerShell (7+, for -Form)
$form = @{
file = Get-Item 'MyApp.exe'
renamePublic = 'true'
encryptStrings = 'true'
}
Invoke-RestMethod -Uri 'https://freeobfuscator.com/api/v1/obfuscate' -Method Post `
-Headers @{ 'X-Api-Key' = 'fo_live_xxxxxxxxxxxxxxxx' } `
-Form $form -OutFile 'MyApp.obfuscated.exe'
C# (HttpClient)
using var http = new HttpClient();
using var form = new MultipartFormDataContent
{
{ new ByteArrayContent(File.ReadAllBytes("MyApp.exe")), "file", "MyApp.exe" },
{ new StringContent("true"), "renamePublic" },
{ new StringContent("true"), "encryptStrings" },
};
var req = new HttpRequestMessage(HttpMethod.Post, "https://freeobfuscator.com/api/v1/obfuscate") { Content = form };
req.Headers.Add("X-Api-Key", "fo_live_xxxxxxxxxxxxxxxx");
var resp = await http.SendAsync(req);
resp.EnsureSuccessStatusCode();
await File.WriteAllBytesAsync("MyApp.obfuscated.exe",
await resp.Content.ReadAsByteArrayAsync());
Responses
| Status | Meaning |
|---|---|
200 | Obfuscated binary in the response body (a .zip with the assembly and .map.txt when includeMap=true) |
401 | Missing or invalid API key |
402 | Key belongs to a non-active subscription |
413 | File exceeds the tier limit |
415 | Unsupported file type |
422 | Obfuscation failed (invalid .NET assembly) |
503 | Server busy — retry after the Retry-After interval |
POST /api/v1/obfuscate/set
Protects several assemblies together in one request. Use it when your
assemblies reach into each other's internals — a library with
InternalsVisibleTo and the assembly that uses it. Protected one at a time,
the library's internal names change and the other assembly can no longer bind to them;
protected as a set, the references between them are rewritten together and they still load.
Send 2 to 20 assemblies as repeated files parts, with the
same header and the same option fields as the single-file endpoint. The response is a
.zip containing each protected assembly under its original file name (so it
extracts as a drop-in replacement), a protection-report.json, and one
.map.txt per assembly when includeMap=true.
curl -X POST https://freeobfuscator.com/api/v1/obfuscate/set \ -H "X-Api-Key: fo_live_xxxxxxxxxxxxxxxx" \ -F "[email protected]" \ -F "[email protected]" \ -F "encryptStrings=true" \ -F "controlFlow=true" \ -o protected.zip
Status codes are the same as above; 400 is returned for fewer than two files
or more than 20. Assemblies that only use each other's
public API do not need this endpoint — the single-file endpoint is enough.