v86 emulates x86-compatible hardware in the browser, translating guest machine code to WebAssembly at runtime for interactive demos and embedded virtual machines.
Overview
v86 simulates an x86-compatible personal computer inside a web page. Guest CPU instructions are translated into WebAssembly modules at runtime so operating systems and applications can run without a native hypervisor on the user machine.
Emulated devices include a Pentium-4-level CPU with SSE3 (with documented gaps), an FPU backed by SoftFloat, storage and CD-ROM via IDE, VGA graphics, PCI, PS/2 keyboard and mouse, timers, interrupt controllers, NE2000 networking, SoundBlaster audio, a modem, and several virtio devices. Maintainers publish compatibility notes for Linux, BSD, Windows, DOS, and many hobby systems.
You can try prebuilt disk images on the project site or embed the engine with libv86.js or the npm package in Vite, React, or other bundler stacks. Integrators can drive a serial terminal, save and restore machine state, and link multiple browser tabs for virtual networking.
Optional Docker and dev-container workflows build the emulator and serve it locally for development. Disk images for tests are fetched separately from the public image catalog rather than shipping inside the source tree.
Key features
- Runtime x86-to-WebAssembly translation
- Broad PC device emulation
- Embeddable JavaScript API
- Preconfigured OS disk catalog
- Emulator state save and restore
- Browser-based virtual networking
- Serial terminal integration
- Optional containerized dev server
Use cases
- Run retro OS demos in a tab
- Embed a VM in educational sites
- Test 32-bit guests without QEMU locally
- Interactive serial-console experiments
- Shareable classic desktop playgrounds