Hoora

How to Turn an HTML File into a Playable Online Game

You've made a game as an .html file on your computer. You double-click it, it opens in your browser and your game starts. So cool. Then you send it to a friend, and suddenly: "it doesn't work", "what is this file?", "I can't open it on my phone". Big letdown.

As long as it stays on your hard drive, your HTML file isn't an online game yet. For anyone to be able to play it, anywhere and without downloading anything, it has to go online, and that takes barely a minute.

Why a local HTML file isn't enough to make an online game

Opened from your computer, an HTML file only exists on your machine. In practice, that causes several problems:

  • No address to share. Your game has no URL, it's just sitting in your folder.
  • Sending the file is a pain. Your friends have to download the .html, find it, open it in the right browser, and so on. In short, it takes ages, and most people give up before the end.
  • It often breaks on mobile. Opened as a local file, a game displays badly on a phone, or not at all.
  • No players. If you want to show it to as many people as possible, it's mission impossible: sharing is complicated, and nobody wants to download a stranger's file.

What you need is a game anyone can launch, on any device, without installing anything.

Turning an HTML file into a playable online game

A game that's playable online is a game you open with a simple link and that runs right in the browser, on desktop and mobile alike. For that, your file has to be hosted somewhere. You have two options:

  • Host it yourself. It's doable, but you need to know a bit about servers and deployment, and sometimes buy a domain name. Count on an evening. At the end, you have a link, but still no players. The different solutions are compared in our guide on hosting an html5 game for free.
  • Use a specialized platform. You drop in the file and your game is playable right away. That's what Hoora does, and it's the method we go through here.

The requirement for turning your HTML file into a game

Before publishing, there's one technical point that will save you most of the headaches. Your game has to fit in a single standalone HTML file that contains everything: the HTML, the CSS and the JavaScript, with no external resources or libraries to download.

Two habits to make sure everything goes smoothly:

  • Keep the file light. Go for graphics drawn in code (Canvas, SVG, CSS) rather than big images, which slow down loading for nothing.
  • Design it in portrait 9:16. Most people will play on their phone, so you might as well build it for that screen from the start.

If you're starting from scratch, that's exactly the format ChatGPT, Claude or Gemini produce when you ask them for a web game. No file yet? See our guide on creating a game with ai.

Turning your HTML file into a playable game, step by step

On the Hoora website, it only takes four steps to go from file to online game.

Step 1: open the import

Go to the website and click the purple "Import" button in the left-hand menu.

The Import button in the Hoora website side menu

Step 2: drop in your HTML file

Drag it into the window or select it from your computer. The maximum size is 100 KB, which is plenty for a standalone mini game.

Dragging and dropping the .html file into the import window

Step 3: check, name and describe

A playable preview appears right away, so you can check that everything works before publishing. Give your game a title and a short description, or save it as a draft to come back to later.

Playable preview and name field before publishing

Step 4: publish

And there you go, your game is online. The community can play it in the browser or in the app, without installing anything and without creating an account. The file forgotten in your Downloads is finally playable by everyone. The full walkthrough, with the publishing screens, is in our guide on publishing your ai creations.

The mistakes that stop an HTML file from becoming a playable game

Three traps come up often:

  • External resources. If your file fetches an image or a script from somewhere else, it will display broken once online. Always ask for a standalone file, with everything inside.
  • A file that's too heavy. With lots of big images, the game lags and takes a while to load. Graphics drawn in code solve the problem.
  • Forgetting mobile. A game designed for a big screen quickly becomes unplayable with a thumb. Test it on your phone before publishing, and our guide to testing an html5 game on mobile shows you how.

Getting people to play your game

Putting your game online is already a big step. Now you need people to play it, and a link nobody shares won't bring you many players.

That's where Hoora goes further than a simple host. Your game shows up in the feed, where people who don't know you can come across it, on the website as well as in the app. The app is available on Android and iOS, and this swipe-based feed is why Gizmodo covered Hoora's ambition to become the TikTok of mobile gaming.

A game published on Hoora with its community stats

Players who like your game can follow you, and you see your stats in real time: views, likes, shares, comments. Little by little, you build an audience and see what people enjoy. To go after your first players, see our guide on how to promote and publish your video game.

Frequently asked questions

  • How do you make an HTML file playable online? You need to host it on a platform that puts it on the web. The fastest way is to import your standalone HTML file on the Hoora website, with the "Import" button: your game becomes playable in the browser, with a simple link.
  • Can I just send my HTML file to my friends? You can, but it's not practical. They have to download it and open it themselves, and it often breaks on mobile. A link to an online game launches in one tap, on any device.
  • Do I need a server or a domain name? No. You drop in the file and the hosting is handled for you, with nothing to set up.
  • Why does my game have to fit in a single file? Because a standalone file contains everything it needs and works everywhere. A game that depends on external files works on your machine but breaks elsewhere.
  • Is it free? Yes, publishing a game on Hoora costs nothing.
  • Do I have to go through a store for it to be playable on a phone? No, the browser is enough. We explain why in our guide to publishing a mobile game without the app store.
  • My game works on desktop but not on mobile, what can I do? Check that it's designed in portrait 9:16 with touch controls, and test it directly on your phone before publishing.

Your game deserves better than sleeping in a folder. Import it, send the link to your friends, and this time, they'll be able to play it.