You have an idea for a small browser game, no build step, no framework, and about ten minutes. So you describe it: one .html file, all CSS and JavaScript inline, no CDN links, no images, a 600x400 playfield, a cup you move with the arrow keys, coffee beans falling, a score, a 30 second timer, a restart button.

That is exactly the input I gave the AI HTML Generator at FileFormat, using a made-up game called Coffee Catch. I ran the same prompt twice, opened both downloads in a real browser, and played them. One worked. One did not. Both are in this post so you can check the difference yourself.

What does the HTML Create app actually give you?

One .html file. The Save As dropdown offers PDF, DOCX, DOC, EPUB, EML, MSG and HTML; pick HTML, paste your description into the prompt box, press Generate Document, and about a minute later the result screen offers a download.

The page posts your prompt to api.fileformat.ai/html/create/api/create?topic=… and gets HTTP 200 with a file id back. The download link is api.fileformat.ai/html/create/Download?id=…, it is public, and it arrives as attachment; filename=AI_Response.html — the same name every time, whatever you asked for.

The AI HTML Generator with the prompt loaded and HTML selected

My two runs took roughly 55 seconds and 80 seconds. The first file was 4,488 bytes on disk, the second 4,564.

The result screen after the run

Does the file work when you open it?

The first download does. Opened in Chrome it makes zero network requests — no fonts, no scripts, no images, nothing — and throws no JavaScript errors. That is not luck: the file contains no <script src>, no <link> tag and no http URL at all. Everything is inline in 4.4 KB.

It also plays. The playfield measures 600x400, a bean spawns roughly every 800 ms and falls two pixels per frame, and holding the right arrow key moved the cup from 285 px to 465 px in about half a second. When a bean reached the cup the score went from 0 to 1 and the bean was removed. The clock counted down from 30.

The generated game running, with a caught bean counted on the score line

When the clock reached zero the page fired a native alert('Time up! Your score: …') rather than showing the score in the page. In automation the dialog left the tab unresponsive until it was closed.

Did it build what you asked for?

Almost all of it, in the first run: the 600x400 field, the cup as a sprite, falling beans, the arrow keys, the score, the 30 second timer, a restart button and an instructions line above the field. The dark background you asked for was there too.

The details are where it drifted. The beans are ☕ emoji, not beans. The cup is 🥤. The “playing area” is a div with a fixed width, so it is not responsive. And the restart button is not clean, which brings us to the more interesting problem.

What happens when you run the same prompt twice?

You get two different programs. The first download was 4,479 characters, the second 4,550 — different CSS formatting, #player in one and .player in the other, different sizes and a different bean glyph. That difference is not cosmetic: the second file does not play.

In the second download the cup never moves. The game loop reads parseInt(player.style.left) before any inline left value has been written, so the value is NaN, every position write becomes invalid and the element stays where the stylesheet put it. I held the right arrow key for a full second and the cup’s position did not change by a single pixel; no bean ever connected, and the score stayed at 0.

The first file has the opposite bug, and you will only notice it if you press Restart. Restart calls the start function again without clearing the intervals the previous game created, so every press adds another timer and another spawn loop. Before restarting, six seconds of play took the clock from 16 to 12 and the bean count from 3 to 7. After one restart, the same six seconds took the clock from 30 to 20 and the bean count from 0 to 11. Two timers, one clock.

So: the generator writes plausible game code. Whether it writes runnable game code varies between runs of the same prompt, and neither version I got was correct on the first try.

Does it work on a phone?

No. The output has no <meta name="viewport"> tag and the playfield is a fixed 600 px wide. At a 390 px wide phone viewport the page laid itself out at a 980 px default width and the playfield measured 603 px, so it overflows the screen rather than scaling. There is also no touch or pointer handling at all — I dispatched pointerdown, mousedown, touchstart and click on the playfield and the cup did not move. Keyboard only.

What this app does not do

  • It does not check that the code runs. The second download cannot be played at all, and the app showed no warning about it.
  • It does not show you the page. You get a download and the app’s result screen; there is no preview of the rendered HTML inside the tool.
  • It does not give you a code editor. If you want to fix the NaN or the duplicate timers, you open the file in your own editor.
  • It does not pull in libraries. My prompt asked for none and got none — zero external references in either file — so a framework or chart library you want is yours to wire in.
  • It does not keep a filename from your prompt. Every download is AI_Response.html.
  • It does not add accessibility, touch controls or a viewport tag unless you describe them, and in my runs it skipped them even though the prompt said “works offline when double-clicked”.

How should you write the prompt?

Be explicit about the things that are cheap to state and expensive to discover: one file, inline CSS and JS, no external URLs, exact dimensions, which keys control what, and where the score lives. My prompt asked for all of that, and the app honoured the structural parts.

Then open the file in a browser before you ship it, and press every button twice. The bugs I found — a player that never moves, a restart that doubles the clock — are the sort of thing a single playthrough catches in ten seconds, and no prompt wording will catch them for you.

Both downloads are attached to this post as sample-output-run1.html.txt and sample-output-run2.html.txt — the site serves attachments as text, so rename either one to .html and open it to play. The prompt is in sample-prompt.txt. Open the two side by side; the difference between a working prototype and a broken one is 71 characters.