D2-Web: Diablo II's 1.13c engine, rebuilt for the browser
We reimplemented the Diablo II: Lord of Destruction 1.13c engine in C++ and WebAssembly, added the quality-of-life features players have been patching in for twenty years, and put it one link away. Bring your own game files. Act 1 is playable today.

Play it now: diablo2.virtastic.app · Source: github.com/Virtastic/d2-web · Talk to us: Discord
Open a tab. Drop in the MPQ files from the Diablo II CD you bought in 2001. Roll a Barbarian, walk out of the Rogue Encampment and start killing Fallen in the Blood Moor. There is nothing to install and nothing to configure, and your files never leave your machine.
That is D2-Web. It is an unofficial reimplementation of the Diablo II: Lord of Destruction 1.13c engine, written in C++20, compiled to WebAssembly and running in your browser. It is not a simple decompile dropped into a browser. It is the engine rebuilt, with 1:1 Diablo II gameplay: the same rules, damage, drops, monster AI and map generation as 1.13c. On top of that sit the quality-of-life features players have been bolting on with mods for twenty years, built in from the start and off unless you want them.
It is an early alpha. Act 1 is playable. We are releasing it now, MIT-licensed, because we need players to break it.
What you can do today
- Create a character of any of the seven classes, with the original select screen and animated portraits.
- Play Act 1: the Rogue Encampment and the first wilderness areas, with combat, skills, monsters, item drops, vendors, waypoints, the stash and your inventory.
- Save and come back. Characters save in your browser and autosave when you close the tab.
- Hear it and watch it: act music, ambient sound, weather and the cinematics.
It runs in desktop Chrome or Chromium. It is not a complete game yet. You will find wrong numbers, missing screens and outright crashes, and we want every one of them reported.
Built on the patch the community chose
Diablo II has had a lot of patches, and 1.13c is the one that stuck. It is the version much of the modding scene standardised on and many private realms ran. PlugY, D2SE, d2bs, D2Ex2 and hundreds of mods target it. When we picked a build to reimplement, we wanted the one with the most community knowledge behind it and the most players who would notice if we got it wrong.
So D2-Web is not “Diablo II-like.” It is that engine: the same simulation, the same item and level generation, the same rules, rebuilt function by function by studying how the original 1.13c program behaves.
That is also why it is not a decompile. A decompiler gives you a rough, machine-made reading of a program; it does not give you an engine that runs on WebAssembly with threads, streams its game files on demand and talks to a browser. D2-Web is written as modern C++20, one function at a time, and each one is held to what the original does. The goal is 1:1 gameplay: if a Fallen hits harder, a drop rolls differently or a level lays out differently than it does in 1.13c, that is a bug, not a design choice.
How we know it plays like the original
Most game reimplementations ask you to trust that they feel right. We don’t think that is good enough.
The original game is the reference for every question. We record a play session as fixed input, run it through the original 1.13c game and through D2-Web, and compare what each one produces, tick by tick: packets, unit state, what gets drawn and what sounds play. Every difference is counted. A change that makes the count worse does not land. A bug a player reports is not closed until the comparison for it reads zero.
The same rule covers performance. When we make D2-Web faster, the output has to stay exactly the same, record for record. Speed that changes the game is a bug, not an optimisation.
That discipline is the reason this took as long as it did, and the reason we are comfortable calling it a reimplementation rather than a remake.
The quality-of-life list
The base game is 1.13c. Everything below is layered on top of it, and none of it changes how the game plays unless you turn it on.
Play it your way
- Widescreen. A widescreen HUD and panels, laid out the way the community widescreen mods draw them, plus selectable resolutions.
- Controller support. Plug in a gamepad and play. It drives the same inputs a mouse and keyboard would, so nothing about the game is faked.
- Touch input. Tap and hold map to the mouse’s two buttons, which is all Diablo II ever needed.
- Configure Controls. The original key-binding panel, working in the browser.
- Install it as an app. Add it to your desktop and it opens fullscreen in landscape, like a game.
Fewer chores
- Shared stash. A PlugY-style big stash shared across your characters, using PlugY’s own file format.
- Monster life bars on hover. See how much health a target has left.
- Autosave on close. Close the tab mid-fight and your character is still there.
- Chat macros. The original phrase hotkeys, sent the way the game sends them.
- Screenshots with the Print Screen key, numbered like the original.
It just works
- Bring your own files, safely. Drag in your MPQs. D2-Web identifies each archive by its contents, not its filename, checks off what it has and what it still needs, and reads them in place. Nothing is uploaded.
- Streams ahead of you. The next area’s tiles are fetched in the background before you walk there, so new areas open without a stall.
- Self-host it in one line. A Docker image,
ghcr.io/virtastic/d2-web, runs it on your own machine or your LAN, with your files or served from a folder. - Realm-ready. A client for community Battle.net-compatible servers is in, off by default. We will never host one.
What it is not
D2-Web is a separate project from two other Diablo II projects you may have seen, and it shares no code with either.
- d2decomped by psi29a is a native decompilation of Diablo II 1.14d on SDL3, with all five acts reported playable.
- d2-webgpu by maszynka builds on d2decomped to bring it to the browser on WebGPU.
We have not used, copied or reviewed their code, and they have not used ours. They are excellent projects, and right now they are further along than we are at playing the whole game. If you want to kill Baal tonight, go play them. That’s fine with us. More people working on keeping this game alive is a good thing.
D2-Web goes a different way. It targets 1.13c rather than 1.14d, runs on plain WebAssembly in the browser without WebGPU, is proven against the original game rather than judged by eye, and puts quality-of-life first.
How it was built
D2-Web is C++20 compiled with Emscripten to 64-bit WebAssembly, with a JavaScript client for input, audio, storage and presentation. Rendering goes through a WebGL2 presenter that shows the game’s own frame byte for byte. Game files are read straight from your MPQs with StormLib.
We read a lot of other people’s work along the way: D2MOO, libd2, d2mapapi, PlugY, d2bs, D2Ex2, and twenty years of Phrozen Keep guides. Part of D2MOO is adapted directly. The credits are in the README.
We’ll also be plain about this: much of the code was written with heavy help from AI coding tools, directed and reviewed by a human maintainer. That is exactly why the test is the original game rather than anyone’s opinion, ours included. Code that doesn’t match the original doesn’t ship, whoever wrote it.
You bring the game
D2-Web ships no Blizzard files: no MPQs, no art, no sound, no text, no binaries. You need your own copy of Diablo II and Lord of Destruction. The front door lists the archives it needs and tells you which ones it has found. D2-Web is a fan project, not affiliated with or endorsed by Blizzard Entertainment.
Help us break it
This is the part where you come in. We need players to:
- Play at diablo2.virtastic.app.
- Find something wrong: a number that’s off, a sound that doesn’t play, a screen that’s missing, a crash.
- Report it on GitHub Issues or in Discord, with your class, where you were and what you did.
Every report becomes a test that runs against the original game. That is how Act 1 gets finished and how Act 2 gets started.
More from Virtastic
D2-Web is the third big port we’ve brought to the browser:
- openmw-web: Morrowind on the OpenMW engine, in a tab. (source)
- freecad-web: the FreeCAD parametric CAD suite, no install. (source)
If you’d like to keep these coming: Patreon · Ko-fi · YouTube · r/virtastic
Stay awhile and listen. Then go report a bug.
Keywords: d2-web, diablo-2, webassembly, games, open-source
Have a desktop app that belongs in the browser? We recompile legacy desktop software to WebAssembly, then maintain and host it. Book a call.
What next: Play Diablo II · More posts · Contact us