Unity WebGL on itch.io: Build Settings, Upload and Fixes
Unity WebGL itch.io guide for Unity 6: Web build settings, compression that works, canvas sizing, saves that survive updates and loading fixes.
Updated · 12 min read · For developers
This is the Unity WebGL itch.io setup that works in Unity 6: which Web build settings to pick, how to zip and upload the build, how to size the canvas so it fits the embed and fullscreen, and how to fix the errors that keep a game stuck on the loading bar. It also covers the problem most guides skip, which is that browser saves disappear every time you upload a new build. Everything here was checked against the Unity 6.3 Web manual and itch.io's HTML5 creator docs in November 2026.
A quick naming note. Unity renamed the WebGL platform to Web in Unity 6, and Build Settings became Build Profiles. The output is still a WebGL build, so you will see both names in docs and forum threads. They mean the same thing.
If you just need the short version of uploading any engine's game, our guide on how to upload a game to itch.io covers the page setup. This one goes deep on Unity.
Before you build: what decides whether it works in a browser
A few things about your project matter more than any setting:
- No C# threads. Unity's Web platform runs your C# on a single thread, because WebAssembly has no multithreaded garbage collector. Anything in
System.Threadingwon't work as expected. Unity's own example isSystem.Threading.Timer, whose callback never fires in a Web build. Use coroutines orUpdatetimers instead. - Size. itch.io allows up to 500MB extracted, no single file over 200MB and no more than 1,000 files. Hitting those limits is a sign the game should be a download instead. Players on a browser page tend to give a game seconds, not minutes, to load.
- Videos. Video clips imported as assets are a common way to blow up the build. One developer on r/gamedev who got a Unity build working on itch.io reported that videos only played once they hosted them online and played them by URL.
- A supported browser. Unity supports desktop Chrome, Firefox, Edge and Safari (Safari 15 or newer for WebGL 2), and on mobile iOS Safari 15+ and Chrome 58+ on Android. The browser must be 64-bit with WebAssembly.
Step 1: Switch to the Web platform
- Open File > Build Profiles.
- Select Web and click Switch Platform. The first reimport can take a while on a big project, so switch early in development rather than the night before a jam deadline.
- Make sure every scene you need is in the Scene List, with your first scene at the top. A scene missing from the list is the classic "works in the editor, freezes in the build" bug.
Step 2: The Player settings that matter for itch.io
Open Edit > Project Settings > Player (or the Player Settings button in Build Profiles) and pick the Web tab. These are the settings worth touching. Leave the rest at their defaults until you have a reason.
Resolution and Presentation
- Default Canvas Width and Height. Set these to the size you will use for the itch.io embed, for example 960x600 or 1280x720. Matching the two keeps the game from being cropped or letterboxed oddly.
- Run In Background. Turn it on if your game should keep running when the player clicks outside the canvas (music, real-time timers). Leave it off for a pause-friendly game.
- Web Template. Unity ships three: Default (a white page with a loading bar), Minimal (just the boilerplate) and PWA. Neither of the first two resizes the canvas to fill the window, which is what itch.io needs when a player hits fullscreen or opens the game on a phone. More on that in Step 4.
Publishing Settings
- Compression Format. Gzip (the default in Unity 6), Brotli or Disabled. This is the setting behind most broken uploads, so it gets its own section below.
- Decompression Fallback. Off by default. Turning it on embeds a JavaScript decompressor and renames the files to
.unityweb. It's a fix for servers you can't configure, with a cost covered below. - Data Caching. Caches your asset data in the browser's IndexedDB so returning players don't download it again. Useful once your build is stable. If returning testers report seeing an old version after an update, try turning it off; the r/gamedev developer above listed it off as part of their working itch.io setup.
- Show Diagnostics Overlay. Adds a small icon that shows memory use and page load time to first frame. Great for a test build, turn it off for release.
Other Settings
- Texture compression format. DXT suits desktop browsers. ASTC or ETC2 suit mobile. You can override this per build in the Build Profile, which lets you make a desktop build and a mobile build from the same project.
- Managed Stripping Level. Higher stripping makes a smaller build. If something breaks after stripping (usually code you reach by reflection), add a
link.xmlto keep those types.
Memory
Unity's defaults are sensible: Initial Memory Size 32MB, Memory Growth Mode set to Geometric, and Maximum Memory Size 2048MB. Unity recommends keeping the maximum at 2048MB; you can go up to 4096MB but the manual notes known Chrome and Firefox bugs above 2048MB. If your game crashes with an out of memory error on load, the usual fix is a smaller build and fewer assets loaded at once, not a higher number.
Code Optimization (in the Build Profile)
Shorter Build Time is the default and fine while you iterate. For the build players will actually see, Unity recommends Disk Size with LTO for mobile browsers and Runtime Speed with LTO when performance matters most. LTO builds are slow, so save them for releases.
Step 3: Pick a compression setting that works on itch.io
Unity compresses your build files at build time. The browser can only unpack them natively if the server sends the right header (Content-Encoding: gzip or Content-Encoding: br). When it doesn't, you get the famous red error:
Unable to parse Build/yourgame.framework.js.br! This can happen if build compression was enabled but web server hosting the content was misconfigured...
Here is how each option behaves on itch.io, based on itch.io's compression docs:
- Gzip (default). itch.io detects gzip content and sets the header for you. This is the setting to start with. Unity notes gzip is natively supported by all browsers over HTTP and HTTPS.
- Brotli. Smaller files, slower builds. itch.io can't detect Brotli by content, so it relies on the
.brfile extension to set the header. It works as long as you don't rename files. If you see the error above with Brotli, switch to Gzip and rebuild before trying anything else. - Disabled. No pre-compression. itch.io's CDN then gzips some file types itself, including
.js,.wasmand.html. That's why "turn compression off" so often fixes a stuck build on itch.io. The catch: the.datafile that holds your assets isn't on that list, so players download it uncompressed. - Decompression Fallback. Works almost anywhere, but Unity warns it means a larger loader and a less efficient loading scheme, and WebAssembly streaming compilation stops working because the
.wasmfile has to pass through the JavaScript decompressor first. In the long Unity Discussions thread on this exact error, the advice is not to ship with Decompression Fallback or with compression disabled, because both mean slower loading every time.
Our recommendation: ship Gzip with fallback off. Only fall back to Disabled or Decompression Fallback if Gzip fails and you've already checked the zip structure in Step 5.
Step 4: Make the canvas fit the embed, fullscreen and phones
itch.io has two display modes: Embed in page, where you set the viewport size, and Click to launch in fullscreen, where the game must adapt to any window size. On mobile, itch.io always uses click to launch in fullscreen, no matter how you set it up for desktop.
Unity's Default template keeps a fixed canvas size, so in fullscreen or on a phone your game sits in a corner or gets cut off. itch.io's docs recommend a template that resizes the canvas, and they link the free Better Minimal WebGL Template by Sean (seansleblanc on itch.io, MIT licensed). To use it:
- Download it and copy its
WebGLTemplatesfolder into your project'sAssetsfolder. - Open Edit > Project Settings > Player, Web tab, Resolution and Presentation.
- Select the BetterMinimal template.
- Optional: set a background color, set "Scale to fit" to false if you want a fixed size, or set "Optimize for pixel art" to true for crisp pixel scaling.
Then make sure your UI uses a Canvas Scaler set to Scale With Screen Size, or your HUD will drift when the window changes shape.
Step 5: Build, test locally, zip
- Click Build and choose an empty folder. You get an
index.html, aBuildfolder and aTemplateDatafolder. - Don't double-click index.html. Opening it from disk gives the error "Loading web pages via a file:// URL without a web server is not supported by this browser". Use Build And Run instead, which starts a local server and opens the game.
- Play it through the first few minutes in at least two browsers. If it fails locally, no itch.io setting will fix it.
- Zip the contents of the folder, not the folder. Select
index.html,BuildandTemplateData, then compress those. When you open the zip,index.htmlmust be the first thing you see. A zip with the build nested one folder down is the most common reason itch.io shows a blank page.
Step 6: Upload and set up the itch.io page
- On itch.io, open your dashboard and create a new project (or edit the existing one).
- Set Kind of project to HTML.
- Upload your zip and tick This file will be played in the browser.
- In Embed options, set the viewport to the same size as your Default Canvas Width and Height, or choose Click to launch in fullscreen if your template resizes.
- Leave Click to play on. It stops a heavy Unity build from loading before anyone wants it, and some browsers mute audio on auto-start anyway.
- Tick Fullscreen button if your game doesn't provide one.
- Tick Mobile friendly only after you've actually played the build on a phone.
- Save, then open the page in a private window to test it as a player would. New projects start as drafts.
One more thing worth knowing: itch.io only takes donations on browser games. If you want to sell the game, set the kind of project to Downloadable and offer the Web build as a free demo or on a separate page. For the rest of the page (cover, screenshots, tags), see how to make a good itch.io page.
Saves that survive an update
This one catches almost every Unity developer who updates a browser game on itch.io. You upload build 2, and every player's progress is gone.
Here's why. Unity stores PlayerPrefs and Application.persistentDataPath files in the browser's IndexedDB under a path that includes a build-specific hash. itch.io serves every upload from a new path on its CDN. itch.io's founder leafo confirmed it on the itch.io forums: games are served from the same domain, but the path changes with every upload because of how the caching works. So the new build looks in a new place and finds nothing.
The fixes developers use:
- Save to a fixed path. In Web builds, write save files to something like
idbfs/YourGameName/save.jsoninstead ofApplication.persistentDataPath, and create the folder if it doesn't exist. Developers on the Unity and itch.io forums report this keeps saves across uploads. It doesn't move PlayerPrefs, so keep important data out of PlayerPrefs. - Use localStorage through a small .jslib plugin. There are open source examples on GitHub that mirror the PlayerPrefs API. Test it in every browser you care about.
- Offer export and import. A "copy save code" button is low tech but survives anything.
Also know that Unity's browser compatibility notes say Safari doesn't support IndexedDB for content running in an iframe, which is exactly how itch.io embeds games. Treat Safari saves as unreliable and tell players.
Fixes for a Unity build that won't load on itch.io
Open the browser console (F12) on the itch.io page first. The error usually tells you which of these it is.
- "Unable to parse ... .br" or ".gz". A compression header problem. Switch to Gzip, rebuild, re-zip. If it still fails, try Disabled, then Decompression Fallback.
- Blank page or "index.html not found". The zip is nested. Re-zip the contents of the build folder.
- Loading bar stuck near the end. Often a compression problem, sometimes a script error on the first frame. Check the console for a null reference. A Development Build shows clearer errors, and development builds aren't compressed, so if a dev build works and a release build doesn't, compression is your suspect.
- 403 errors on assets. itch.io's server is case-sensitive and blocks requests for folders. Check file name casing and remove any absolute paths starting with
/. - Requests to your own server fail. itch.io is HTTPS only, so any API you call must be HTTPS and allow cross-origin requests.
- Out of memory. Reduce texture sizes, split content with Addressables, and keep Maximum Memory Size at 2048MB.
- Works on desktop, black screen on a phone. Try ASTC or ETC2 texture compression, a smaller build, and the BetterMinimal template. Test on a real device.
- Native multithreading enabled. Unity's Native C/C++ Multithreading is experimental and needs cross-origin isolation headers. On itch.io that means the experimental SharedArrayBuffer option in the embed settings, which moves the game to a different domain and can break saves and third-party scripts. Unless you've measured a need, leave it off.
Godot developers hit a different set of problems with the same platform, and we cover those in the Godot web export guide. If your team uses both engines, the two guides together cover every browser build you'll ship to itch.io.
Updating the build
You can upload a new zip and delete the old one from the edit page, but for frequent updates use butler, itch.io's command line uploader. It only sends the files that changed, which matters with a 100MB Unity build. Our itch.io butler tutorial shows the exact butler push command and a GitHub Actions setup that pushes a Web build on every commit. Remember that every push is a new path, so sort out saves first.
Get real players into the browser build
A Web build is the lowest friction playtest you can run. No download, no install, no antivirus warning. A tester clicks a link and is playing in seconds, which is why it's worth getting working even if your final release is on Steam.
To keep a test private, set the itch.io page to restricted with a password or download keys, as covered in our itch.io playtest guide. Then you need people who'll actually play and say what happened. On Get Playtests you can post your playtest free: players browse, pick games that interest them, and leave written, video or livestream reviews. No credit card. Paste your itch.io link and tell them what you want checked, like load time on their machine or whether the controls make sense in a browser. For running the sessions themselves, see remote playtesting.
Unity WebGL itch.io checklist
- Platform switched to Web in Build Profiles, all scenes in the Scene List
- No
System.Threadingtimers or threads in game code - Default Canvas Width and Height match the itch.io embed size
- A resizing template (BetterMinimal or your own) if you use fullscreen or mobile
- Compression set to Gzip, Decompression Fallback off
- Code Optimization set to an LTO option for the release build
- Tested with Build And Run in two browsers
- Zipped the contents,
index.htmlat the top level - Kind of project set to HTML, "played in the browser" ticked
- Embed size set, Click to play on, Fullscreen button on if needed
- Mobile friendly ticked only after testing on a phone
- Saves written to a fixed path so they survive updates
- Page opened in a private window before sharing
Sources
- Uploading HTML5 games (itch.io creator docs)
- Deploy a Web application (Unity 6.3 Manual)
- Web Player settings (Unity 6.3 Manual)
- Web build settings reference (Unity 6.3 Manual)
- Using Web templates (Unity 6.3 Manual)
- Web browser compatibility (Unity 6.3 Manual)
- Optimize Web platform for mobile (Unity 6.3 Manual)
- Web technical overview (Unity 6.3 Manual)
- (Unity) Better Minimal WebGL Template
- WebGL Build Error: Unable to parse framework.js.br (Unity Discussions)
- Losing PlayerPrefs between Uploads (itch.io community)
- Persistent Data in (updatable) WebGL games (itch.io community)
- June 2025 working settings for Unity WebGL export build profile for itch.io (r/gamedev)