.NET deobfuscator
The honest version of how .NET deobfuscation works — what a deobfuscator can reverse, what it may not recover, and how to evaluate the analysis effort your protection adds. We build an obfuscator, so this is written from the defender's side.
Inspect a real before-and-after DLL with ILSpy and compare 2,003 runtime results. The downloadable synthetic sample shows what changes and what remains readable.
What .NET deobfuscation actually is
Deobfuscation is the attempt to undo obfuscation and get back to readable code. It works on .NET at all for the same reason obfuscation is needed in the first place: a .NET assembly is IL plus complete metadata, and the runtime has to be able to execute it. A deobfuscator reads that IL, recognises the mechanical transformations an obfuscator applied, and reverses the ones it knows how to.
The important word is mechanical. Deobfuscators are largely pattern matchers. They are effective against transformations they have a rule for, and weak against anything they do not recognise.
The tools people mean
- de4dot — the classic automated .NET deobfuscator. It ships presets for many well-known obfuscators and can, for a recognised target, restore systematic names, decrypt strings and clean up known control-flow tricks in one pass.
- dnSpy / dnSpyEx — a decompiler and debugger. Not a one-click deobfuscator, but a person can step through an assembly, watch strings decrypt at runtime and rebuild understanding manually.
- ILSpy, dotPeek — decompilers. They turn IL back into C#. Against an obfuscated assembly they still produce compilable-looking code, just with meaningless names and, where the deeper layers are used, tangled logic.
What a deobfuscator can reverse
- Systematic renaming. It cannot recover your original names, but it can give everything fresh, consistent placeholder names so the structure is easier to follow than a soup of identical-looking symbols.
- String encryption — when the decryptor ships with the code. If strings are decrypted at runtime by a routine inside the same assembly, a tool (or a debugger) can call or observe that routine and recover the plaintext.
- Known control-flow patterns. If the obfuscator's flattening is a shape the deobfuscator has a rule for, it can often straighten it back out.
What can remain recoverable
Renaming removes selected original identifiers from metadata. A decompiler can still infer useful names and reconstruct logic; symbols, source or a private rename map can expose original identifiers. Runtime string decryption can be observed. Custom control flow and virtualized bytecode may require extra work, but their difficulty depends on the implementation and the analyst.
How to evaluate protection against deobfuscation
- Inspect renamed members and confirm public library APIs remain compatible.
- Check selected strings in the binary and inspect their runtime decryption paths.
- Inspect control flow and reference proxies on representative methods rather than assuming every method changes.
- Test marked virtualized methods for correctness and performance. Virtualization is an additional analysis obstacle, not a guarantee against recovery.
Run a decompiler on your own protected sample and repeat your application tests. Keep credentials and other recoverable secrets off the client. Our downloadable verification case shows both changed names and logic that remains readable.
Frequently asked
Is there a free online .NET deobfuscator?
We do not offer one, and we would be cautious of any site that de-protects arbitrary uploads — that is a reverse-engineering service, not something we provide. The well-known open tools in this space are de4dot and dnSpy; both run locally.
Can a deobfuscator recover my lost source code?
Only in the sense that a decompiler reconstructs logic — never your original names, comments or formatting. If you have lost the source to your own obfuscated build, keep the un-obfuscated assembly and mapping from now on; nothing reliably rebuilds what renaming discarded. On Pro you can download a private rename map with each build and later decode a crash stack trace back to your own names — but that map stays with you. We never store it, so there is nothing on our side to leak.
Does obfuscating stop decompilation?
No — see the .NET obfuscator overview. Obfuscation makes the decompiled output unrewarding to read; it does not prevent the decompile.
Protecting rather than reversing? Start with the .NET obfuscator, read the honest threat model, or see how tools compare on protection depth.