Skip to content
How to Download HTML5 Games for Offline Play guide image
PLRun Blog

How to Download HTML5 Games for Offline Play

Plrun

Plrun

Gaming Editor

May 11, 2026 11 min read

You can download HTML5 games for offline play in some cases, not all. Single-player titles built from static HTML, JavaScript, and asset files can be saved with Save Page As → Webpage, Complete, mirrored with wget --mirror, or pulled with HTTrack, then run locally through a small web server. Multiplayer titles (Krunker, Bullet Force, .io games) and games that fetch level data, ads, or scores from a server cannot run offline by any method. The cleanest offline path is the one developers build in — a Progressive Web App (PWA) that installs from the browser’s address bar.

Key Takeaways

  • “Many single-player HTML5 games can be saved with Save Page As → ‘Webpage, Complete’ or with wget –mirror.”
  • “Multiplayer and server-dependent HTML5 games cannot run offline regardless of download method.”
  • “PWAs with service workers are the developer-built offline path — look for an ‘Install’ icon in the browser address bar.”
  • “itch.io offers many HTML5 titles as downloadable web builds; MarketJS and GameDistribution license offline-ready titles to publishers.”
  • “Downloading does not transfer copyright — personal offline play is generally fine, redistribution is not.”

Can You Download HTML5 Games to Play Offline?

You can download many HTML5 games for offline play, but not all. Single-player titles that load only static HTML, JavaScript, and asset files can run from a local folder. Multiplayer games — including Krunker, Bullet Force, and most .io titles — and games that fetch level data, scoreboards, or ad slots from a server cannot run offline, regardless of how cleanly you mirror their files.

The distinction is what the game does after page load. A small platformer that loads index.html, a JavaScript bundle, sprite sheets, and audio files makes no further network calls once running — it is a perfect offline candidate. A browser FPS like Krunker or a shooter like Bullet Force opens a WebSocket to a game server, fetches matchmaking, and validates the client; nothing about saving the HTML changes that. The same applies to most titles in the .io games category, which are multiplayer-first by design. “Download” in this context means mirroring a web build to disk so it can launch from a local file path or a local server, not extracting a single executable.

Verdict: “Single-player static HTML5 games download cleanly. Anything with a live server connection — multiplayer, leaderboards, ads, level streaming — does not.”

How to Save an HTML5 Game with Save Page As, wget, or HTTrack

For a single-page HTML5 game, use your browser’s Save Page As → Webpage, Complete. For multi-asset games with sprite atlases, audio, and external scripts, use wget --mirror --convert-links --adjust-extension --page-requisites --no-parent <url>, or HTTrack/WinHTTrack on Windows. Each tool walks the page, pulls every linked resource, and rewrites links so the saved copy can open from disk.

Method 1: Save Page As (Webpage, Complete)

In Chrome, Firefox, or Edge, press Ctrl+S (or Cmd+S on macOS) and choose “Webpage, Complete.” The browser saves game.html plus a game_files folder containing JavaScript, CSS, and images. This works well for simple single-page titles. It often misses dynamically-loaded assets that the game requests at runtime.

Method 2: wget –mirror

wget is the most reliable option when a game loads many files from one folder. A common, well-tested invocation is:

wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://example.com/games/my-game/
  • --mirror enables recursion and timestamping
  • --page-requisites pulls every asset needed to render the page
  • --convert-links rewrites URLs so the local copy works
  • --adjust-extension adds .html/.css where missing
  • --no-parent prevents the crawler from climbing out of the game’s folder

Method 3: HTTrack / WinHTTrack

HTTrack offers the same behavior with a GUI on Windows and a command line on Linux/macOS. Point it at the game URL, set the depth, and let it mirror.

Opening the saved game

Many games will not run directly from file:// because modern browsers block fetches and module loads under that scheme. Open the saved folder through a local web server instead — covered in the next section.

Pro Tip: “Always include --no-parent with wget. Without it, the crawler can climb to the host’s root and download thousands of unrelated files before you notice.”

How to Run a Downloaded HTML5 Game Locally

Most saved HTML5 games will not run from a file:// path because of CORS and module-loading restrictions. Serve the folder through a tiny local web server: python3 -m http.server 8000 from inside the game folder, then open http://localhost:8000 in a browser. On Chromebooks and locked-down school laptops, an installable PWA achieves the same result without extra tooling.

The “open index.html and see a black canvas” experience is almost always a file:// permissions issue, not a broken download. Browsers treat file:// as a special origin with stricter rules for fetch, ES modules, and the Audio API. The fix is one command in the game’s folder:

python3 -m http.server 8000
# or
npx http-server -p 8000

Then visit http://localhost:8000. VS Code’s “Live Server” extension does the same thing with a click.

On a Chromebook, the simplest options are (a) install the game as a PWA if it offers one, or (b) use a web-server browser extension to serve the folder. Some school networks block local server ports, in which case opening the game as a PWA before going offline is the cleaner route.

Pro Tip: “If a saved HTML5 game shows a black screen on first launch, open it via http://localhost rather than as a file. That fixes the majority of ‘why is my downloaded game broken’ problems.”

How PWAs and Service Workers Enable Offline HTML5 Games

When an HTML5 game is built as a Progressive Web App (PWA), the developer registers a service worker that caches assets using the Cache API and a manifest.json that lets the browser “install” the game. Once installed, the title launches from a home-screen or app-launcher icon and runs without a connection — no manual saving required.

A PWA is, at its core, a website with two extra pieces: a service worker that intercepts network requests and a manifest that describes how the site should behave like an app. The service worker can pre-cache the entire game (HTML, JS, CSS, sprite atlases, audio) on first visit, then serve those assets from cache on every subsequent load. PWAs require HTTPS — Chrome, Edge, and Firefox will not install a PWA from an insecure origin. When the browser sees a valid manifest and a registered service worker, an install icon appears in the address bar (or under the browser menu).

Key Insight: “If the address bar shows an install icon while you are on a game’s page, the developer has built offline support in. That is almost always more reliable than mirroring the page yourself.”

Where to Legally Download HTML5 Games

Legitimate sources include itch.io (many HTML5 games offer a downloadable web build under “Downloads”), GameDistribution and MarketJS for licensed offline distribution to publishers, and open-source HTML5 game repositories on GitHub. For embedding rather than downloading, Google Sites supports an Embed → By URL block that displays a game inside a page.

itch.io

itch.io lets developers ship HTML5 games as both browser-playable builds and downloadable ZIPs. The platform also has tag pages such as “html5” and “offline” where you can filter for titles explicitly marked offline-friendly. Many indie devs include a downloadable web build alongside Windows/macOS/Linux versions.

GameDistribution / MarketJS

These are commercial distributors that license HTML5 games to website publishers. They sell offline-ready builds and embeddable URLs under contract — useful if you run a casual games portal or want a legal route to host puzzle or arcade titles. Pricing and terms are per-license.

Open-source on GitHub

Many HTML5 games are open source under MIT, GPL, or Creative Commons licenses. git clone the repository, npm install and npm run build (if needed), and you have the full source plus assets. Read the LICENSE file before reuse.

Embedding on Google Sites

To put an HTML5 game on a Google Sites page, use Insert → Embed → By URL, paste the game’s URL, and choose “Whole page.” This embeds the live game; it does not download it.

Safety Note: “Downloading a game for personal offline play is not the same as redistributing it. Always check the license before re-uploading, embedding on a public site, or reusing assets.”

The most common mistakes when downloading HTML5 games are skipping CDN-hosted scripts, ignoring CORS errors, trying to download multiplayer games, and “ripping” assets without a license. Copyright still applies to HTML5 games: personal offline play is generally acceptable, but redistribution or asset reuse requires permission. Older Flash titles convert to playable form via Ruffle, not by direct HTML5 download.

Missing assets and CDN scripts

When a game loads scripts from a CDN (https://cdn.example.com/phaser.min.js), wget --no-parent will not follow them. Pass an additional --span-hosts together with --domains to whitelist the CDN, or download those scripts manually and rewrite the references.

CORS errors

Service-worker registration, ES module imports, and fetch against local files often fail under file://. The fix is to serve the folder over HTTP locally, as covered above.

Multiplayer is not downloadable

Games like Krunker, Bullet Force, Smash Karts, or Evowars.io require live server connections for matchmaking, physics validation, and chat. No download method changes that.

Mirroring a game for personal use is generally permitted in many jurisdictions; uploading the result to your own site or extracting sprites and audio for a new project is a copyright issue and may also violate a site’s terms of service. When in doubt, contact the developer or use a permissively licensed alternative.

Converting Flash to HTML5 with Ruffle

If the title you want is an old Flash (.swf) game, the modern path is Ruffle, an open-source Flash Player emulator written in Rust that runs on the desktop and in browsers via WebAssembly. As of May 2026, Ruffle supports the majority of ActionScript 1.0/2.0 content and a growing portion of ActionScript 3.0. Ruffle is not a direct HTML5 download tool — it lets a Flash file play inside an HTML5/WebAssembly runtime.

Safety Note: “Personal offline use is one thing; reuploading a downloaded HTML5 game or reusing its assets is a copyright matter. Check the LICENSE or contact the developer before any public redistribution.”

Frequently Asked Questions

In most jurisdictions, downloading a freely accessible HTML5 game for personal offline use is generally permitted, while redistributing the same files, hosting them on your own site, or extracting assets for another project is not — those acts require a license from the rights holder. Always check the game’s LICENSE file or terms of service; itch.io developers often state offline use permissions explicitly. This is general information rather than legal advice, and copyright rules differ between countries.

Why does my downloaded HTML5 game show a black screen?

The most common cause is opening index.html directly from disk, which puts the page on a file:// origin where modern browsers block module imports, fetch, and service workers. The fix is to serve the folder through a small local web server — for example, run python3 -m http.server 8000 from the game’s folder and visit http://localhost:8000. Other causes include missing CDN scripts skipped by wget --no-parent and assets that the game tries to fetch at runtime from the original host.

Can I download multiplayer HTML5 games like Krunker or Smash Karts?

No. Multiplayer HTML5 games rely on live servers for matchmaking, world state, physics validation, and anti-cheat. You can mirror the client to your disk, but launching it will simply hang at “Connecting” or skip straight to an error. This applies to Krunker, Bullet Force, Smash Karts, Evowars.io, and most other .io titles. The only way to play these offline is if the developer ships an explicit offline or bot mode — which Bullet Force does in its mobile app, but not in its browser build.

How do I install an HTML5 game on a Chromebook?

The cleanest method on ChromeOS is to install the game as a Progressive Web App. Open the game’s URL in Chrome; if the developer supports PWA installation, an install icon appears in the address bar — click it and the game lands in the app launcher and runs offline thereafter. If no PWA is available, you can use a web-server extension to serve a saved folder locally, though school-managed Chromebooks often restrict extensions and local servers. PWAs are the most reliable path on locked-down devices.

How do I add an HTML5 game to a Google Sites page?

In the new Google Sites, open the page and choose Insert → Embed → By URL, paste the game’s full URL, and select “Whole page” if prompted. Click Insert and resize the block to fit. This embeds the live game inside an iframe — it does not download the game, and the original host’s terms still apply. If you have an .html file plus assets, upload them to a Google Drive folder set to “Anyone with the link,” then embed the share URL the same way.

Can I convert a Flash (.swf) game to HTML5?

You do not need to convert — you emulate. Ruffle, an open-source Flash Player emulator written in Rust, runs .swf files in modern browsers via WebAssembly and on the desktop as a standalone player. As of May 2026, Ruffle implements most of ActionScript 1.0/2.0 and a growing share of ActionScript 3.0; older Flash titles run reliably, while complex AS3 games may still hit gaps. True conversion to native HTML5 source code requires manual or commercial porting — Ruffle skips that work entirely.

How do I download an HTML5 game’s source code or assets?

For open-source games, clone the GitHub repository and follow the README — that is the only path that gives you the unobfuscated source and a clear license. For closed-source web builds, your browser’s DevTools (Network and Sources tabs) can show the JavaScript bundles, images, and audio the game loads, and wget --mirror can pull them. The files you retrieve are still copyrighted; using them outside personal offline play, especially in your own projects, requires permission from the developer or rights holder.

Plrun

Plrun

The Plrun editorial team covers browser games, HTML5 releases, and practical tips for finding fast, safe games to play instantly.