ILSpy vs dnSpy vs dotPeek: .NET decompilers compared

These are the tools someone opens your shipped assembly with. They all reconstruct readable C# from your metadata and IL, but differ in maintenance, editing power and what they mean for your threat model. An honest 2026 rundown of ILSpy, dnSpyEx, dotPeek and ILDASM — and what each implies for protecting your code.

If you ship a .NET assembly, these are the tools someone will open it with. They all do the same core job — read your metadata and IL and reconstruct readable C# — but they differ in what else they do, how actively they are maintained, and what they mean for your threat model. Here is an honest, current rundown, and what each one implies for protecting your code. The mechanism they all rely on is covered in how .NET decompilers read your code; this page is about the tools themselves.

ILSpy — the default

Free, open source, cross-platform (Windows, macOS, Linux, plus a VS Code extension and a command-line ilspycmd), and the most actively maintained of the group. For most people "decompile a .NET assembly" simply means "open it in ILSpy." Its C# reconstruction is excellent — it reverses async/await, iterators, closures and LINQ back into idiomatic code rather than a tangle of gotos.

What it means for you: this is the baseline you should assume. If a layer of your protection only inconveniences someone who hasn't discovered ILSpy, it isn't protecting much. The honest test is to open your own release binary in it and read it as an outsider would.

dnSpy / dnSpyEx — decompiler plus editor and debugger

dnSpy is the one that comes up in licence-bypass discussions, because it does more than read: it has an integrated debugger and can edit a method and save the modified assembly. That combination — attach, watch a check run, flip a branch, save — is exactly the "patch the compiled output" attack that anti-tamper and the integrity check exist to make fail loudly instead of succeed quietly.

The original dnSpy project was archived by its author; the actively maintained successor is dnSpyEx, which tracks modern .NET. Treat "dnSpy" in any current discussion as meaning the fork.

What it means for you: dnSpy is why a client-side check is a deterrent, not an enforcement mechanism. Its editing power is also why the decision that matters most — a licence or activation check — is safest validated server-side, where no amount of local patching reaches it.

dotPeek — JetBrains' free decompiler

Free from JetBrains, Windows-only, and polished. Its stand-out feature is acting as a symbol server: it can generate PDBs on the fly so you can step into third-party assemblies from Visual Studio as if you had the source. Decompilation quality is on par with ILSpy; it's a comfortable choice for anyone already in the JetBrains ecosystem.

What it means for you: nothing different in principle from ILSpy — it reads the same metadata and IL. It's listed here because it's common, not because it defeats anything the others don't.

ILDASM / ILSpy's IL view — raw IL, not C#

ILDASM ships with the .NET SDK and shows the raw IL rather than reconstructed C#. It's less convenient for casual reading, but it's the tool of choice when someone wants to see exactly what the compiler emitted — useful against control-flow obfuscation, where the reconstructed C# gets ugly but the IL is still the ground truth. ILSpy and dotPeek both offer an equivalent IL view.

What it means for you: control-flow and renaming change what the reconstructed C# looks like, but the IL is always present and valid (it has to run). This is the honest ceiling on static obfuscation, and the reason method virtualization — which replaces IL with bytecode for a private interpreter — is the one layer that changes what ILDASM can show at all.

de4dot and deobfuscators — a different category

Worth naming to avoid confusion: de4dot and similar tools are not decompilers, they are deobfuscators. They try to reverse known obfuscation patterns — undoing control-flow tricks, decrypting strings, cleaning up proxy calls — before you decompile. What they can and can't give back is the subject of can obfuscated code be reverse-engineered?; the short version is that they restore structure but never your original names, which are gone for good once renamed.

The takeaway. Every tool here is free or near-free and a few minutes' download. Assume the person reading your shipped assembly has all of them. That's not a reason to skip obfuscation — it's the reason to be precise about what each layer buys: renaming removes the names these tools hand back, control-flow uglifies the C# they reconstruct, and virtualization is the only layer that removes the IL they read.

So where does that leave protection?

The tools are good and they aren't going away, so the realistic goal is cost, not invisibility. Match the layer to what you're defending against: renaming as the floor, string encryption and control-flow for a static read, virtualization plus the integrity check for the crown-jewel methods, and server-side validation for anything you genuinely cannot afford to have patched. The layer decision guide maps each one to the threat it answers — then open your own obfuscated build in ILSpy and see the difference for yourself.

Try it on your own assembly

Upload a DLL or EXE and download the obfuscated result. Free, no signup, nothing stored.