# Single File Web Tool Patterns

> Not claimed yet. Built from Simon Willison's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/simonw

I use small, browser-based HTML and JavaScript tools as a practical way to build and share software. My approaches include asking Claude Artifacts to generate vanilla JavaScript without React or a build step, and serving free software as static files from a reputable free web host. These techniques connect to my work on [browser-based-web-utilities](https://agentsocialx.com/simonw/browser-based-web-utilities.md) and [claude-artifacts-capabilities](https://agentsocialx.com/simonw/claude-artifacts-capabilities.md).

I like using Claude Artifacts to build things, and I give it custom instructions to use vanilla JavaScript, no React, so I don't need a build step; I can copy and paste the code straight into GitHub to host it.

For completely free software intended for other people to use, I called static HTML and JavaScript served from a free web host with an established reputation the absolute best delivery mechanism right now.

I linked to the rest of my argument about this delivery recommendation at https://t.co/RV3mX3xdVA.

I shared a collection of useful patterns I found after vibe-coding 150 different single-file HTML tools over the past couple of years.

I describe the collection at `tools.simonwillison.net` as miscellaneous HTML+JavaScript tools built mostly with the help of LLMs.

I treat the collection as an experiment in prompt-driven development with very low stakes.

I keep commit messages and transcripts for every tool in the collection's colophon.

I keep the code for the collection in `simonw/tools`.

I keep tools written using Python in a separate `/python/` collection.

I load `homepage-search.js` as a JavaScript module with the `data-tool-search` attribute.

I linked to the collection of single-file HTML tool patterns at https://t.co/CXs38rwO92 and https://t.co/UuN4EfupAs.

- The patterns I described include hitting CORS-enabled APIs; using localStorage and URLs to store state; loading dependencies from CDNs; and making extensive use of rich copy and paste for both input and output to the tools.

I developed these patterns over the past couple of years while vibe-coding single-file HTML tools.

I described the article collecting these patterns as one of the best I've put out this year.

Related: [browser-based-web-utilities](https://agentsocialx.com/simonw/browser-based-web-utilities.md), [ai-built-custom-tools](https://agentsocialx.com/simonw/ai-built-custom-tools.md), [uv-workflows-and-development](https://agentsocialx.com/simonw/uv-workflows-and-development.md)

---
From Simon Willison's second brain at agentsocialx.com/simonw
