Coding Quests
The Scroll Library
Guides

How to Export Your Godot 4 Game to the Web (and itch.io)

June 16, 20265 min read

A game on your hard drive isn't really a game yet. The moment you put it in a browser and send someone a link, it becomes real. Web export is the fastest way to get there, and it's how most people share their first Godot project on itch.io. The export itself is easy. A couple of gotchas catch everyone, so here's the whole path.

Get the web export templates

Godot needs the web export templates installed before it can build for the browser. Open the editor and go to Editor, Manage Export Templates. If they're not there, download them (the button fetches the matching version for you). This is a one-time step.

Add a Web export preset

Go to Project, Export. Click Add, and choose Web. That creates a preset with sensible defaults. You usually don't need to change anything to get started.

Then hit Export Project, pick an empty folder, and name the main file index.html. Godot spits out a handful of files: the HTML page, a .js loader, a .wasm file, and your packed game. They all need to stay together.

You can't just double-click it

Here's the first thing that trips people up. Open that index.html straight from your file manager and you'll likely get a black screen or a console full of errors. Modern browsers block the features Godot's web build needs when a page loads from a file:// path. It's not broken. It just has to be served over HTTP.

The quick way to test locally is a tiny web server. If you have Python:

# run this in the folder with index.html
python -m http.server 8000

Then open http://localhost:8000 in your browser. Now it loads. Godot's editor also has a one-click "Remote Debug, Run in Browser" option that spins up a server for you.

Upload to itch.io

itch.io is the easiest home for a browser game, and it's free. Zip your exported files (with index.html at the root of the zip, not inside a subfolder). On itch, create a new project, set the Kind to HTML, and upload the zip. Check the box that says this file will be played in the browser.

One setting matters: find the SharedArrayBuffer support option in the embed settings and turn it on. Godot 4's web builds use threading features that depend on it, and leaving it off is the most common reason a game that worked locally shows a black screen on itch. Set a sensible viewport size for the embed while you're there.

When the screen is still black

If it loads locally but breaks once uploaded, run through this short list:

  • SharedArrayBuffer support is enabled in the itch embed settings.
  • index.html is at the top level of your zip.
  • You're on a recent browser. Older ones choke on WebAssembly threads.
  • The browser console (F12) almost always names the real problem. Read it before guessing.

Performance is the other thing to expect: web builds run slower than desktop, and big games take a while to download. Keep your first web project small and it'll feel snappy.

Ship something finished

Honestly, the hardest part of web export is having a game worth exporting. That's the whole reason to build complete, small projects instead of half-finished prototypes. Our free Co-Op Crate Combustion quest walks you through a full, finished local co-op game across 13 chapters, exactly the kind of project that's satisfying to export and hand to a friend with a link.

FAQ

How do I export a Godot 4 game to the web?

Install the web export templates via Editor, Manage Export Templates, then go to Project, Export, add a Web preset, and export to an index.html file. Godot generates the HTML, JavaScript, and WebAssembly files your browser needs to run the game.

Why is my Godot web export a black screen?

Two usual causes. Locally, you're opening index.html from a file path instead of serving it over HTTP, so serve it with a local web server. On itch.io, you forgot to enable SharedArrayBuffer support in the embed settings, which Godot 4 web builds require.

Can I put my Godot game on itch.io?

Yes, and it's free. Export to web, zip the files with index.html at the root, create an HTML project on itch, upload the zip, mark it as played in the browser, and enable SharedArrayBuffer support in the embed settings.

godotguideexportweb

Reading is the map. The quest is the territory.

Build this for real in the Co-Op Crate Combustion quest. It's free, no card needed.

Start the Quest
Written by Coding Quests

We teach Godot 4 by making you build complete systems: inventories, save systems, souls-like controllers, enemy AI. The scrolls are free. The quests are where it sticks.