Skip to content

How to Publish an HTML5 Game: A Guide for Indie Developers

8 min read | Updated: November 24, 2026

Finishing a game is one milestone; getting it in front of players is another. The browser is one of the easiest places to start, because nobody has to install anything and a single link is enough to try your game. But a web build has its own demands: it has to download quickly, run on phones as well as laptops, and behave politely inside a page. This guide covers preparing a Unity WebGL or HTML5 build, the checks worth making before release, and how to submit your game to OnlineGameWorlds.

Our picks to play for free

  1. #1Zigzag Arrow Run 3DThe arrow moves forward automatically.
  2. #2Supermarket SimulatorHelp customers shop and find items.
  3. #3Water Sort PuzzleTap a bottle to pour water into another.
  4. #4Robot JumpTap the screen to make the robot jump upward.
  5. #5Zigzag Wall RunnerThe cube moves upward automatically.

Which engines can publish to the web?

Any engine that exports a WebGL or HTML5 build that runs in a modern browser will do. Our developer documentation page lists Unity, Godot 4, Construct 3, GameMaker (the HTML5 export rather than GX.Games), Phaser, PlayCanvas, Cocos Creator, Defold, GDevelop and plain HTML5 or Three.js, with notes on how each one reaches JavaScript. If your engine is not listed but can produce an HTML5 build and run JavaScript, it integrates the same way.

Keep the download small

Size is the single biggest factor in whether players wait for your game to load. Our requirements ask you to target 40 MB or less in total, because players on mobile connections drop off above that. Smaller is better still. In Unity, the usual levers are well known: remove unused assets and scenes from the build, lower the maximum size of textures that never appear large on screen, compress audio, and turn on code stripping so unused engine and script code is left out. Unity's build report in the Editor log lists the largest assets, which tells you where the savings are. Make sure Development Build is switched off for release, since development builds are larger and slower.

Memory matters as well as download size. Keep it modest: our guideline is a Unity heap of 512 MB or less. Large heaps can fail on phones and lower-end machines, and smaller builds load faster and reach more devices.

Compression and server headers

Web builds should be compressed. Unity offers Brotli and Gzip in the publishing settings; Brotli usually produces smaller files, while Gzip is a little faster to build. Either is accepted on OnlineGameWorlds. Compressed files need the server to send the right headers so the browser decompresses them natively. Unity's Decompression Fallback option exists for servers that cannot do this, but it adds decompression code to the loader. Do not enable it for our platform: we serve the correct headers already.

Test through a web server, not by double-clicking

Opening a WebGL build straight from your file system often fails, because browsers restrict what local files can load. Run it through a local web server instead. Unity's Build And Run does this for you, and most engines include a similar preview option.

Design for phones from the start

Most players are on mobile, so support both mouse and keyboard and touch. Make on-screen controls large enough for a thumb, keep important information away from the screen edges, and decide early whether your game is portrait or landscape. Remember that browsers block sound until the player interacts with the page, so start audio after the first tap or click rather than on load. Simple input carries well across devices: one-tap games such as Robot Jump, Zigzag Wall Runner or Clock Timing Challenge work the same with a finger or a mouse, which is part of why they suit the browser so well.

A pre-release checklist

  • Run the final build with no errors in the browser console.
  • Test on at least one real phone in each major mobile browser, not only in a desktop emulator.
  • Check that the game pauses and resumes cleanly when the tab is hidden or the player switches apps.
  • Resize the window and rotate the phone to confirm the layout holds at different sizes.
  • Play the first minute as a newcomer would: can someone start without instructions?
  • Time the load on a slow connection using your browser's network throttling tools.

Optional extras: cloud saves and ads

OnlineGameWorlds adds a small browser API to every game page. Cloud saves use window.OGW.saveState and window.OGW.loadState, with up to 10 slots per game per player, each holding a JSON string of up to 64 KB. Calls are skipped silently for logged-out players, so they are always safe to make. For ads, window.ShowInterstitialAd shows a full-screen interstitial, and window.ShowRewardedAd shows a rewarded ad; an ogw-ad-result event then reports whether the result was rewarded, closed or failed, so you only grant a reward when it was earned. Unity developers can download ready-made scripts from the developer page, including interstitial and rewarded ad managers and a focus plugin, and there are example snippets for Godot, Construct 3, Defold, GameMaker and GDevelop.

What every published game gets automatically

Some platform features need no code at all. Players earn XP and levels for playing your game, platform achievements and daily challenges count it, it can be recommended to players with matching interests, players can resume it from their profile and the homepage, and it can earn a HOT badge if it trends. Players can also rate and review it on its game page. Examples of games already running on the site include the 3D path game Zigzag Arrow Run 3D, the shop simulation Supermarket Simulator and the colour puzzle Water Sort Puzzle; browse the new browser games page to see what has been added recently.

Prepare your store assets

Before you submit, make a thumbnail at a 16:9 ratio, at least 512 by 288 pixels, and an icon at a 1:1 ratio, at least 256 by 256 pixels, both in WebP or PNG. A dark or transparent background is preferred for the thumbnail. Show real gameplay or your main character clearly; a thumbnail is usually seen small, so bold shapes read better than fine detail. The content policy is short: no explicit adult content, violence must be cartoon or stylised, and no real-money gambling.

How to submit your game to OnlineGameWorlds

Export your build, confirm it runs locally with no errors, and compress the whole build folder as a ZIP. Then sign in, open your Profile page and click Submit Game. Fill in your game's details and links, upload your thumbnail and icon, and you will get a confirmation once we receive it. Our team tests each game within 3 to 5 business days, and you can follow its status, from Submitted to In Review to Approved or Rejected, in your profile dashboard. Once approved, the game goes live and its platform features switch on. For background on how browser builds work for players, read our Unity WebGL games guide, and once your game is live, our games for your website guide shows how site owners embed our games.

Frequently asked questions

How big can a WebGL game be on OnlineGameWorlds?

Aim for 40 MB or less in total, because players on mobile connections drop off above that. Keep memory modest too, with a Unity heap of 512 MB or less.

Should I use Brotli or Gzip compression?

Either is accepted. Brotli usually gives smaller files. In Unity, do not enable Decompression Fallback, because the platform already serves the correct headers.

Do I have to add ads or cloud saves?

No. Both are optional. XP, achievements, daily challenges, recommendations and the trending badge work without any extra code.

How long does review take?

Our team tests submitted games within 3 to 5 business days, and the status is shown live in your profile dashboard.

Back to all articles