Image from The Backdooms, based off of Doom. Courtesy of Kuber Mehta.

A Single QR Code Contains Doom…Sort Of

A developer has achieved the seemingly impossible: fitting a playable, Doom-inspired game entirely within a single QR code by leveraging extreme code minification, Zlib+Gzip compression, and the browser’s DecompressionStream API. This project, aptly named The Backdooms, packs under 2.5 KB of HTML and JavaScript, well within a QR code’s ~3 KB data capacity, into a self-extracting program that launches directly in modern browsers without any downloads. The result is a fully offline, infinitely generated game that nods to the 1993 classic, demonstrating both a technical feat and a playful homage to the demoscene’s longtime tradition of size-restricted intros.

And for you Doom fans out there, especially with the new Doom: The Dark Ages coming out, this is a very interesting and unique take on the “will it run Doom” meme that keeps living on.

How Did This Start?

In April 2025, Kuber Mehta released “The Backdooms”, a compressed, self-extracting HTML game inspired by DOOM (1993) and the Backrooms, entirely encoded in a single QR code. Upon scanning with a capable QR reader, such as QRScanner.org, it streams the data URI into the browser, decompresses it in real time, and renders an endless 3D maze environment reminiscent of id Software’s landmark shooter. This article explores the origins, technical innovations, and implications of cramming a mini-game into a single QR code.

Who Is Kuber Mehta?

Kuber Mehta, also known by his GitHub handle Kuberwastaken, is a passionate student fascinated by AI and computer science. Throughout a “week-long study” (which ultimately extended beyond seven days), Mehta applied aggressive minification techniques to push the boundaries of QR code storage and runtime decompression in browsers.

Inspiration and Development

QR code The Backdooms (yes, you can play it from here!), based off of Doom. Courtesy of Kuber Mehta.

Mehta’s project almost echoes demo-scene practices that date back to the early crack-intro experiments of the 1980s, where programmers demonstrated hardware mastery by fitting visual demos into tiny memory footprints. By combining modern web APIs with procedural generation, he recreated that spirit in under 2.5 KB of code, small enough to live in a single QR matrix.

So surely Kuber got inspired by that, right? Or by some other cool experiment that shows hardware being used in the most minimal way possible?

…no, not at all. Kuber states on a post, “So it all started from me watching this random video a couple of years ago by Matttkc and being extremely intrigued by it.” I gotta hand it to them, that’s something I’d totally do as well, so I’m all for it.

For you computer nerds out there, most things below are a quick insight into how Kuber made it. I’m sure I’ve made a mistake or two somewhere, so please take it with a grain of salt.

Technical Feat: Compression Meets QR

QR Code Data Limits

A standard QR code (Version 40, error correction level L) can store approximately 2.9 KB of binary data, roughly the size of a small text document. To fit within this limit, The Backdooms uses:

  • Zlib compression with Gzip headers, hand-tuned for minimal overhead.
  • Base64 encoding to transport the compressed stream safely within an HTML data URI.
  • DecompressionStream API, a modern web feature that decodes the stream on the fly in supported browsers.
Minification & Self-Extraction

Every byte counts. Mehta employed “EXTREMELY aggressive minification,” stripping whitespace, renaming variables to one-letter tokens, and eliminating any nonessential code paths. The final payload is wrapped in an HTML shell that, when opened, automatically decompresses and executes the game, requiring no external resources.

How It Works: From Code to QR

  • HTML Input: Start with the minified THE-BACKDOOMS.html containing the game logic and assets.
  • Compression: Apply Zlib with custom wbits and header settings to minimize size.
  • Base64 Encode: Convert the compressed byte stream into a Base64 string.
  • Wrap: Embed the string in an HTML <script> that uses new DecompressionStream(‘gzip’) to inflate the data.
  • Generate QR: Use Mehta’s QRGEN.py Python script with qrcode[pil] to produce a Version 40, error-correction-level L QR code image (qrcode.png).
  • Scan & Play: Scan with a browser-capable QR scanner to instantly boot the game offline.

Playability and Compatibility

  • Browsers Supported: Most major browsers currently support the DecompressionStream API required for real-time decompression.
  • Performance: With its tiny footprint, the game delivers a little clunky WASD movement and procedural level generation in 8-bit style. Give it some slack, it’s on a QR code!
  • Offline Fun: Once scanned, the entire code is stored locally, so no network connection is needed after the initial load.

Significance and the Modern Demoscene

Image from The Backdooms, based off of Doom. Courtesy of Kuber Mehta.

This project stands at the intersection of web innovation and demoscene tradition. While early demos showcased graphical prowess in tight memory budgets, The Backdooms brings that ethos to the mobile age, packing both engine and assets into a QR code. It underscores how far compression and browser APIs have evolved, and inspires developers to explore similarly audacious mini-projects.

More Great Content