Home › How to Put an HTML5 / JavaScript Game on Steam (2026)

How to Put an HTML5 / JavaScript Game on Steam (2026)

Your vibe-coded game runs in a browser tab. Steam sells desktop games, so the HTML5 build has to become a Windows, macOS or Linux app before Valve will review it. This guide covers the wrapper choice, the Steamworks bindings that give you achievements and the overlay, packaging for each platform and Steam Deck, and the Steam rules that trip up games ported from web portals. Every fact is from Valve's, the frameworks' or the libraries' own docs and repos.

Last updated:

Free download · one page + PDF · updated weekly, current edition November 16, 2026

🎁 Free: The AI Game Dev Stack 2026

The best AI tool for each job in a solo or indie game (3D, sprites and pixel art, animation, audio, NPCs), MCP setups for Unity, Unreal, Godot and Roblox, and which free plans you can actually ship with.

Yours free when you join the VibeStack Weekly: new AI game-dev tools and releases every Monday, 5-minute read. Unsubscribe anytime.

Why a browser game needs a desktop wrapper

Steam installs and launches executables. Valve's build review checks that your game “must successfully launch in all supported operating systems listed on the store page”, and each operating system gets its own launch option and depot in Steamworks. A folder with index.html doesn't meet that on its own, so you bundle it with a runtime that opens a window and renders your game: Electron, Tauri or NW.js. Getting the build itself clean (relative paths, no CDN requests, one index.html) is the same work as for web portals, covered in how to publish an HTML5 game. The store side (fee, review times, Coming Soon, Next Fest) is in the Steam launch checklist. This page is the part in between.

The overlay catch. Valve's overlay FAQ answers “My game runs in a browser. Can the Overlay work in that?” directly: the overlay needs a game that renders frames consistently, and “web browsers do not support this model”. Valve's suggested workaround is an embedded Chromium rendered offscreen into a native window, which it calls “not an easy task”. This matters more than it sounds: the overlay shows achievement unlock notifications, and Steam's in-game purchase dialog opens in the overlay. Plan to test it early, whichever wrapper you pick.

Electron vs Tauri vs NW.js

ElectronTauri (v2)NW.js
What renders your gameBundled Chromium plus Node.js, the same engine on every OSThe system webview: WebView2 (Chromium-based Edge) on Windows, WKWebView (WebKit) on macOS, webkit2gtk on LinuxBundled Chromium plus Node.js; Node modules can be called straight from the DOM
App size (from the docs)Electron's docs say most Electron apps are over 100 MBTauri calls its binaries “very small” because they use the OS webview; a Linux AppImage grows from the 2-6 MB range to 70+ MB because it bundles dependenciesYou redistribute the NW.js runtime with your app; a “normal” flavor without DevTools is smaller than the SDK flavor
Steamworks from JavaScriptsteamworks.js (prebuilt, no compiling) or greenworks (you build it for Electron)No JavaScript binding: use the Rust crate steamworks (steamworks-rs) in Tauri's Rust side and expose commands to your gamegreenworks ships prebuilt NW.js binaries; steamworks.js also describes itself as for NW.js and Electron
Steam overlaysteamworks.js has a documented helper, electronEnableSteamOverlay()Not covered in Tauri's or steamworks-rs's docs; on macOS and Linux the webview is WebKit, not Chromium. Test before you promise itNot covered in NW.js's or greenworks' docs. Test before you promise it
What you need to buildNode.js; Electron Forge packages and makes installers (DMG, deb, MSI, zip and more)Rust plus platform deps (Microsoft C++ Build Tools and WebView2 on Windows, webkit2gtk 4.1 on Linux)Node.js; nw-builder or manual packaging; npm install on each target OS for native modules
Pick it ifYou want the least friction: the Chromium you tested in Chrome, prebuilt Steam bindings and an overlay helperDownload size matters a lot and you (or your AI agent) are comfortable writing a little RustYou already use greenworks or an engine that exports to NW.js

Our pick for most vibe coders: Electron plus steamworks.js. It's the path with the fewest moving parts: the same Chromium your game already runs in, prebuilt native binaries for Windows x64, Linux x64 and macOS (Intel and Apple Silicon), and an overlay helper. You pay for it in download size. Tauri's smaller builds come with three webview engines to test and Steam calls written in Rust.

steamworks.js vs greenworks: which is maintained?

Both are MIT-licensed Node add-ons that expose Steamworks to JavaScript. Here's where they stood on October 28, 2026:

Pin whichever version you test with, and check each repo's issues before you start.

Achievements and the overlay in Electron

Achievements are defined per app on the Steamworks partner site (an API name, display name, description and icons). In your game, steamworks.js's client.achievement.activate('API_NAME') sets the achievement and stores stats in one call, which is what Valve's docs ask for (SetAchievement, then StoreStats). Steam then shows the unlock notification in the overlay. For icon sizes, Achievement Sets and the bulk CSV import, see Steam achievements for indie games.

For the overlay, steamworks.js's README says to call require('steamworks.js').electronEnableSteamOverlay() at the end of main.js. That helper adds Chromium's in-process-gpu and disable-direct-composition switches and forces a repaint every frame, so the overlay always has a frame to draw on. The overlay only appears when the game is launched through Steam, so test it from your Steam library, not from npm start. The default shortcut is Shift+Tab.

A security note. To call steamworks.js from your game page, its README sets contextIsolation: false and nodeIntegration: true. Electron's security checklist recommends the opposite (context isolation is on by default since Electron 12, and disabling it also disables the sandbox). That's a fair trade-off for a game that only loads its own local files. The cleaner option is to initialize steamworks.js in the main process and expose a few functions (say, unlock(name)) through a preload script and IPC. Either way, never load remote web pages into a window with Node access.

Step by step

  1. Make a Steam build of the web game. Remove portal ad SDKs and any links to outside stores, and bundle every asset locally (the build basics are in the HTML5 publishing guide).
  2. Wrap it. For Electron, a main.js that opens a fullscreen-capable BrowserWindow and loads your index.html. Electron's security guide prefers a custom protocol over file://. Prompt for Claude Code, Cursor or OpenAI Codex: “Wrap the web game in game/ as an Electron app with Electron Forge: one window, F11 toggles fullscreen, context isolation on, steamworks.js initialized in the main process and exposed through a preload script as unlockAchievement(name), and electronEnableSteamOverlay() called at the end of main.js.”
  3. Connect Steamworks. Create your app in Steamworks to get an App ID. While developing, a steam_appid.txt file containing only that ID sits next to the executable. Valve says to remove it before uploading to your depot. For production, steamworks.js's README says to copy the Steamworks redistributable library for each OS (from sdk/redistributable_bin) into the root of your build.
  4. Add achievements and saves. Define achievements on the partner site and call them from the game. For saves, Valve recommends Steam Cloud so players can continue on another PC or a Steam Deck; steamworks.js has cloud.writeFile and cloud.readFile.
  5. Package per OS. Windows and Linux: ship 64-bit builds (for Linux, Valve says 64-bit binaries are “highly recommended”). macOS: Valve requires new Mac apps to be 64-bit and notarized by Apple, with the entitlements com.apple.security.cs.disable-library-validation and com.apple.security.cs.allow-dyld-environment-variables for the Steamworks and overlay libraries, and without com.apple.security.app-sandbox. Electron's docs list what notarizing takes: the Apple Developer Program (annual fee), and Xcode, which needs a Mac. Tauri on Linux: build on the oldest system you want to support that has WebKitGTK 4.1 (Tauri suggests Ubuntu 22.04 or Debian 12) to avoid glibc errors.
  6. Upload. Add a launch option per OS and OS-specific depots in Steamworks, upload with SteamPipe, and put new platforms on a password-protected beta branch to test first. Tick an operating system on the store page only after you've tested that build: review checks that it launches on every OS listed.
  7. Test on Steam Deck. See the next section.
  8. Do the store side. Coming Soon page, reviews, demo and Next Fest: follow the Steam launch checklist and fill in the AI disclosure. Choosing how players first try it (a free Playtest, a demo or paid Early Access)? Read Steam Playtest vs demo vs Early Access.

Steam Deck

Steam Deck runs native Linux builds, and Windows builds through Proton, Valve's compatibility layer. If your game has a Linux build, Valve's compatibility review tests that first, falls back to the Windows build under Proton if the Linux build has problems, and keeps whichever result is better. The criteria for a Verified badge that matter most for web games:

Valve also recommends that single-player content works offline. That's another reason to bundle every asset and font locally, not load them from a CDN.

Steam's rules for games that started on web portals

Don't ship your API keys

If the game calls an LLM, a voice API or any paid service at runtime, the key must not be in the files players download. Electron's app archive and NW.js's packaged files are on the player's disk, and NW.js's own source-protection tool (nwjc) is for hiding code, not secrets. Valve says the same about its own keys: publisher Web API keys “must not be distributed with a game client”. Put a small server in between that holds the key and rate-limits requests. Cloudflare Workers secrets, for example, are encrypted values your Worker reads at runtime. Before you upload, ShipCheck can scan the repo for leaked keys and committed .env files.

Pre-upload checklist

Related: how to vibe code a game · publish an HTML5 game on the web · Steam launch checklist · Steam AI disclosure · AI playtesting and QA · controller support (Gamepad API and Steam Deck).

Porting a browser game to Steam? Get the VibeStack Weekly digest: new AI game-dev tools and Steam rule changes, every Monday.

Sources (checked October 28, 2026): Steamworks Documentation (Steam Overlay; Stats and Achievements; Microtransactions and the Microtransactions Implementation Guide; Web API authentication; Review Process; Onboarding; Platforms; Uploading to Steam; steam_api.h; Steam Deck and Steam Machine Compatibility Review; Steam Deck and Steam Machine Recommendations); electronjs.org (Why Electron?, Packaging Your Application, Code Signing, Security); v2.tauri.app (What is Tauri?, Architecture, Webview Versions, AppImage, Prerequisites); nwjs.io and docs.nwjs.io (Package and Distribute, Build Flavors, Protect JavaScript Source Code); the GitHub repos and READMEs of ceifa/steamworks.js, greenheartgames/greenworks and Noxime/steamworks-rs (release and commit dates from GitHub, npm and crates.io); Cloudflare Workers Secrets docs. The recommendations (which wrapper to pick, calling Steam from Electron's main process, the order of steps) are ours, not Valve's.

Get the Starter Stack ($12) Get the free weekly digest

Our picks (5)

Claude Code

AI Code Editors & Agents

Anthropic's agentic coding tool for the terminal, VS Code and JetBrains. Uses a Claude Pro/Max plan or the API.

#cli#agent
freemium

Cursor

AI Code Editors & Agents

AI-first code editor with agent mode, built on VS Code.

#editor#agent
freemium

OpenAI Codex

AI Code Editors & Agents

OpenAI's coding agent: CLI, IDE extension, web and cloud tasks. Included in ChatGPT plans (Free with limits). Unity ships an official Codex skills plugin (unity@unity-agent-plugin) for Unity 6+. The ModRetro Chromatic plugin (November 2026) builds Game Boy and Game Boy Color games as GB Studio projects, playtests them in a built-in emulator and can flash them to a Chromatic handheld cartridge.

#cli#agent
freemium

ShipCheck

Deployment & Hosting

Free security scan for GitHub repos built with Lovable, Bolt, Cursor, Claude or ChatGPT: finds leaked API keys and tokens (including the last 100 commits), vulnerable npm/Python packages and committed .env files, with a 0-100 risk score in plain English. Optional $39 Fix Pack adds paste-ready fix prompts and a re-scan.

#security#vibe-coding#github
freemium

Cloudflare Workers

Deployment & Hosting

Serverless edge compute plus Workers AI.

#serverless

+ Your tool here

Reach builders, vibe coders & indie game devs. Featured listings from $49/mo.

Advertise →
🧰 The Vibe Coder's Starter Stack: AI rules files, a prompt library and a ship-it checklist. $12.
Get the pack

FAQ

Can you sell an HTML5 game on Steam?

Yes, as a desktop app. Wrap the web build with Electron, Tauri or NW.js so it launches as a Windows, macOS or Linux program. Valve's build review checks that it starts on every operating system listed on the store page.

Should I use Electron or Tauri for a Steam game?

Electron is the simpler path for most web games: it bundles Chromium (the same engine on every OS), and steamworks.js gives you prebuilt Steam bindings plus an overlay helper. Electron apps are big, though; its docs say most are over 100 MB. Tauri builds are much smaller because they use the system webview, but that means WebKit on macOS and Linux, and Steamworks calls go through a Rust crate.

Does the Steam overlay work in an Electron game?

Not by default. Valve says browsers don't render frames the way the overlay needs. steamworks.js provides electronEnableSteamOverlay(), which adds two Chromium switches and repaints every frame. Test it by launching the game from your Steam library and pressing Shift+Tab.

Is greenworks still maintained?

Partly. Its README calls it maintained on a best-effort basis, but it shipped v0.22.0 in September 2025 with prebuilt binaries for NW.js. steamworks.js has no npm release since 0.4.0 in August 2024, with commits until September 2025. Pin the version you test, whichever you choose.

Can I keep my Poki or CrazyGames ads in the Steam version?

No. Steam's onboarding rules don't allow applications with advertising-based business models, and in-game purchases must use Steam Wallet. Remove portal ad SDKs from the Steam build and sell the game, or make it free.

Do I need a Mac to ship the macOS version on Steam?

In practice, yes. Valve requires new macOS apps to be 64-bit and notarized by Apple, and Electron's docs say notarizing needs the Apple Developer Program (an annual fee) and Xcode, which runs only on macOS. You can launch on Windows (and Linux) only and add macOS later.

Will my web game work on Steam Deck?

Usually, if it runs as a Linux or Windows build. Steam Deck runs Linux builds natively and Windows builds through Proton. For a Verified badge, all content must be reachable with the default controller configuration, text entry must open an on-screen keyboard, and text must be readable at 1280x800.

Where should I keep my OpenAI or Claude API key in a Steam game?

On a server you control, never in the game files. Anything in the build ends up on players' disks. Have the game call your own endpoint (for example a Cloudflare Worker that stores the key as a secret) and rate-limit it.

Free download · one page + PDF · updated weekly, current edition November 16, 2026

📬 Get the VibeStack Weekly + the free AI Game Dev Stack 2026

The best AI tool for each job in a solo or indie game (3D, sprites and pixel art, animation, audio, NPCs), MCP setups for Unity, Unreal, Godot and Roblox, and which free plans you can actually ship with.

Yours free when you join the VibeStack Weekly: new AI game-dev tools and releases every Monday, 5-minute read. Unsubscribe anytime.