frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Useful patterns for building HTML tools

https://simonwillison.net/2025/Dec/10/html-tools/
126•simonw•2d ago

Comments

wiseowise•2d ago
Amazing article with lots of useful info. Big kudos, Simon.

This really showcases the power of the single page apps and why web will be always ahead of native for this kind of Swiss Army Knife tools.

With LLMs, it gets ridiculously easy to “develop” (generate) those too.

simonw•2d ago
It really is wild how quickly these things pop out - this one here took a couple of prompts, probably ten minutes from idea to shipping a working implementation: https://tools.simonwillison.net/pypi-changelog?package=llm&c...
TomasBM•2d ago
Pretty nice. I've been using LLMs to generate different Python and JS tools for wrangling data for ontology engineering purposes.

More recently, I've found a lot of benefit from using the extended thinking mode in GPT-5 and -5.1. It tends to provide a fully functional and complete result from a zero-shot prompt. It's as close as I've gotten to pair programming with a (significantly) more experienced coder.

One functional example of that (with 30-50% of my own coding, reprompting and reviews) is my OntoGSN [1] research prototype. After a couple of weeks of work, it can handle different integration, reasoning and extension needs of people working in assurance, at least based on how I understood them. It's an example of a human-AI collab that I'm particularly proud of.

[1] Playground at w3id.org/OntoGSN/

NotMichaelBay•2d ago
Nice, I do this often enough that I created a bookmarklet to download an HTML file from clipboard after copying ChatGPT's code block.

I've also been using LLMs to create and maintain a "work assist" Chrome extension that I load unpacked from a local directory. Whenever I notice a minor pain point, I get the LLM to quickly implement a remedy. For example, I usually have several browser tabs open for Jira, and they all have the same company logo as the favicon, so my Chrome extension changes the favicon to be the issue type icon (e.g. Bug, Story, etc) when the page loads. It saves a little time when I'm looking for a specific ticket I've already opened.

lewisjoe•2d ago
I also find that sticking to a single file makes coding agents perform better (fewer surgical edits, faster outputs, sensible changes, etc).

Not sure why, but the moment the file is split into files and subfolders, coding agents tend to do a lot more changes that what is absolutely necessary. That way a single html file wins!

dave1010uk•2d ago
Thanks Simon!

My tool collection [0] is inspired by yours, with a handful of differences. I'm only at 53 tools at the moment.

What I did differently:

Hosted on Cloudflare Pages. This gives you preview URLs for pull requests out the box. This might be possible with Github Pages but I haven't checked. I've used Vercel for similar projects in the past. Cloudflare seems to have the odd failed build that needs a kick from their dashboard.

Some tools can make use of Workers/Functions for backend processing and secrets. I try to keep these to a minimum but they're occasionally useful.

I have an AGENTS.md that's updated with a Github action to automatically pull in Claude-style Skills from the .skills directory. I blogged about this pattern and am still waiting for a standard to evolve [2].

I have a base stylesheet that I instruct agents to pull in. This gives a bit of consistency and also let's them use Tailwind, which they'd seem to love.

[0] https://tools.dave.engineer/

[1] https://github.com/dave1010/tools/tree/main/functions

[2] https://dave.engineer/blog/2025/11/skills-to-agents/

nels•1h ago
Really enjoyed this, interesting read as always! It reminded me of Google Labs’ recent GenTabs project [1], and also of a recent ACM paper on user-assembled LLM-mediated tools from web content [2]. Feels like similar concepts are emerging in multiple places, all centered around lightweight intent-driven tools rather than traditional apps, which I think makes a lot of sense. Curious how this will evolve!

[1] https://labs.google/disco

[2] https://dl.acm.org/doi/10.1145/3706598.3713285

btbuildem•1h ago
I think UIs will become more "generative" or "on demand". Not necessarily always generated anew, but assembled from pre-generated (reproducible) components, to suit a specific workflow.

I think especially in context of software that is complex and takes a long time to master, this could be the next breakthrough. Instead of paths-to-goal being buried in sequences of menus and config panels, workflow pathways would be invocable with plain language.

Havoc•1h ago
Great timing - I've taken up vibecoding and picked personal tools with simple HTML/CSS/JS/python stack as the learning ground too.

Personal tools seem like a reasonable place for happy path vibecoding given small blast radius and LLMs can do that sort of static page in front of python backend really well.

I've also been surprised how much active learning I'm doing despite specifically not look at code. Between the need to spec things out carefully (plan.md) and fast iteration loop it's been a huge boost. Having the LLM look at a plan.md and suggest improvements has lead to a lot of "oh I didn't think about that" learning on architecture and user requirements link.

Presumably much of that learning boost is because I'm a hobbyist tier programmer, guessing professionals wouldn't experience the same since they learned this via manual coding trial & error over years.

al_borland•1h ago
I’ve been making stuff like this for a while (pre-LLM days). They are great little side projects that tend to be useful without getting overly complex. While I’ve vibe coded a couple just to get something done that I needed, I tend to like to write them myself still, as I enjoy the process.
mattkdev•1h ago
Been writing code since the 80's on my C64 and I love it but at this point, I will never write another line of code yet I will produce more code than I ever have! It's just as fun if not more.
toastal•1h ago
> The alternative to CDNs is to use npm and have a build step for your projects. I find this reduces my productivity at hacking on individual tools and makes it harder to self-host them.

No. You can vendor these scripts & host them 1st party so you aren’t leaking data to these CDNs or risk users not actually getting the scripts. It isn’t like CDNs give you a performance boost anymore.

https://httptoolkit.com/blog/public-cdn-risks/

chrisweekly•1h ago
Great link.
simonw•1h ago
I wish vendoring was less of a hassle.

I'll vendor and self-host for my professional projects, but for these small experimental utilities I've stopped caring.

xnx•1h ago
If HTML tools could make network calls (CORS be damned), they could replace a huge portion of hosted apps.
simonw•1h ago
I'm tempted to run a CORS proxy somewhere - maybe on Cloudflare Workers - but I'm nervous that any open proxy is liable to be abused.

I could do an authentication protected one that only I could access though...

born-jre•1h ago
I am building platform which makes it easy to host this kind of app but it has own set of idiosyncrasy u have to adhere to.

https://github.com/blue-monads/potatoverse

btbuildem•1h ago
I really like the simplicity here (maybe because it mirrors my own approach). No build chain, no node_packages, no frameworks.

I wonder if packaging the results as web components would be the next logical step.

valbaca•1h ago
HTML tools are a good name. I called them something like "a local html file"

One problem I solved with this was a packer needed to scan a few (10-40) ids into his barcode scanner. It was not enough where pulling up their bulk-id-uploader program but also too tedious to go to some "number to barcode" website.

Turns out, barcodes can be made from a google font!

https://fonts.google.com/specimen/Libre+Barcode+39

You can just display a number using that font. Then hooked up a for-loop that's progressed by pressing the space bar: paste in IDs, scan first, space, scan next, repeat.

oulipo2•1h ago
Unrelated, but I bought a walking pad, and because I often use it at home while working on the laptop, and I wanted a nice UI to track the speed/time etc, I just asked claude to do one:

https://pastebin.com/5HRLh1G6

it does something like this

https://imgur.com/a/888BtpG

and connects through BLE

fallinditch•1h ago
Another useful pattern for certain types of app is to include a function that saves the HTML file to your local drive/memory as a new file - for example, if the app features user inputs like writing or drawing.
fallinditch•52m ago
It's a little problematic to share an HTML file that you made or saved on your phone with other phone users directly, for example by sending via a messaging app: Android it's ok, but iOS won't open or save an HTML file sent in this way. Apparently there is a workaround to long press on the file to save it to your Files folder first.

This issue is relevant if your app's functionality includes the user changing the contents of the file and re-saving as a new file.

simonw•1h ago
I just shipped a new one of these a few minutes ago (from my phone).

I found out about a new Python HTML parsing library - https://github.com/EmilStenstrom/justhtml - and wanted to try it out but I'm out without my laptop. So I had Claude Code for web build me a playground interface for trying it out: https://tools.simonwillison.net/justhtml

It loads the Python library using Pyodide and lets you try it out with a simple HTML UI.

The prompts I used are in this PR: https://github.com/simonw/tools/pull/156

dotancohen•44m ago
Serious question. How do you "try out" a library if somebody else (or something else) is writing the code?

Thank you.

simonw•39m ago
The thing that matters for me when considering a new library is what it can do. Once I know that I can decide if it's worth learning how to use it at a code level.

In the case of JustHTML I've now been able to try it against a few different HTML documents, seen it do good pretty-printing, played with its CSS selector implementation and got a feel for its event-based streaming parser. I'm very impressed! I think I'll be using it in the future next time I need an HTML parser.

dotancohen•32m ago
I see, thank you.

Until vibe coding came along, the ergonomics of a library were no less important than its functionality. But I understand how LLM assisted coding changes that perspective.

I'll go tend to my empty lawn now.

pseudosavant•1h ago
I love this pattern. I’ve been using it myself here: https://pseudosavant.github.io/ps-web-tools/

Create PDFs from images, a Wordle hint/solver, or a classic DVD screensaver. Lots of stuff.

chrisweekly•1h ago
> "If you want to see the code and prompts, almost all of the examples in this post include a link in their footer to “view source” on GitHub. The GitHub commits usually contain either the prompt itself or a link to the transcript used to create the tool."

As if your steady stream of learning-in-public experiments and insights weren't generous enough. Seriously, massive kudos for sharing all the details.

gaigalas•1h ago
Why not introduce a single shared CSS for style consistency? Not full CSS separation, each tool could still have its local CSS.

Things like styling buttons, responsiveness, and so on are better solved once.

A good rule of thumb is: if the shared CSS fails to load, page still fully works but it might be uglier (weird fonts, etc). That's a reasonable rule for proper isolation (tools remain simple to understand, code remains reusable, etc).

I love the idea of self-contained tools, but you're already using CDNs. Having a shared CSS wouldn't hurt and actually make the tools better.

I would go as far as having a shared JS too (same idea, works if it doesn't load).

That's essentially what I did in https://alganet.github.io/spiral/ (also vibe coded).

Each spiral is mostly independent. You can go ahead and delete the shared CSS from the <head>, they still work and don't break funcionality. However, by having the shared CSS I made them consistent, made them friendly to phone users and so on.

simonw•42m ago
Yeah, I've been thinking some kind of reusable styles or style guide might be a good idea at this point.

It's been fun collecting a bunch of inconsistent tool designs just to see how the different models behave, plus occasionally I go for something with a topical theme like https://tools.simonwillison.net/terminal-to-html or https://tools.simonwillison.net/new-yorker-style - but a little more consistency could be nice.

gaigalas•19m ago
Definitely!

Not only for the user, but it makes sense for the process of making the tools as well.

If I left the agent for itself, it often come up with outrageous styles and I need to prompt it for something more sober.

---

You can do a lot with just CSS. I restored this 2009 project of mine just now:

https://alganet.github.io/ghiaweb/

It still works (minor misalignments though), all HTML is pure (no class=, no css=, no <div>). The global CSS does everything: the forms, the drop-down menus, etc.

Nowadays, we can do even better, no build step or anything like that.

eliben•58m ago
Great work, Simon -- thanks for sharing!

One tool I'd really like to see in this format is a simple "turn the background of this PNG to transparent". Models still refuse to follow the instruction to create transparent backgrounds for logos they create, and I often have to look for other tools doing this as post-processing.

It's possible that this is too complicated for the "few hundred lines of js" code envelope, though.

simonw•50m ago
Running this now...

  Build transparent-png.html - a tool that lets you open any image and then click on colors within that image to make them transparent - showing a preview of the resulting PNG against a checkerboard pattern and optional against other selected background colors below, plus a download PNG option
  
  It should also accept pasted images
Here's what I got (from Opus 4.5 in Claude Code for web via the Claude iPhone app): https://tools.simonwillison.net/transparent-png
indigodaddy•30m ago
Dude, you are amazing. Maybe you should make a suggestion box. Then while you are sleeping, the AI could evaluate the suggestions, and if they are good, it could prototype the tool, and then you could review the prototypes in your waking hours before clicking the tool to production. :)

(I’m not actually kidding)

throwaway7783•42m ago
In the same spirit I have started building single page nanodjango +htmx apps hosted on railway, starting with, you guessed it, a Todo list app. No login needed.

https://web-production-1fc69.up.railway.app/

bilater•36m ago
Have been doing the same except I do use React because its my hammer haha. But I agree if you're not used to it then pure html/cs/js make sense.

https://www.hackyexperiments.com/micro

soared•32m ago
Surprised AI studio isn’t recommended here - you can go from prompt->preview->deploy in like a couple seconds.

They have a library of sample apps you can edit but I wish they included the prompts and history to build each since I generally can’t get large apps to work - after a while the I’ll just produces more bugs as complexity grows. But I’m also a bad vibe coder and never read the code so entirely my fault :)

simonw•31m ago
I don't trust it to give me share URLs that anyone can access without a Google account and that will work forever into the future.

It may well do that, but it's not earned my trust yet!

soared•30m ago
Ah I’ve only used that feature once actually I’ll have to try it, I was talking about the deploy on gcp button (but pointlessly not free compared to your github pages recco!)
indigodaddy•25m ago
I was displeased as well with the share url requiring login for AI studio.
jackfranklyn•27m ago
The barcode font trick from valbaca is brilliant. I've done similar things with base64-encoded data URIs to make tools completely standalone - no network calls, no CDN dependencies.

One pattern I've settled into: keeping tools under ~200 lines of JS total. Past that threshold I start losing the ability to hold the whole thing in my head, and the main benefit of these tools is that you can open them in a text editor and understand everything immediately.

The CORS limitation that xnx mentions is real though. I've worked around it a few times by having tools accept paste-from-clipboard instead of fetching URLs directly. Less elegant but it keeps the tool self-contained and avoids the proxy problem simonw mentioned.

ulrischa•26m ago
This was the first submission: https://news.ycombinator.com/item?id=46236333

I tried Gleam for Advent of Code

https://blog.tymscar.com/posts/gleamaoc2025/
88•tymscar•1h ago•37 comments

Fast, Memory-Efficient Hash Table in Java: Borrowing the Best Ideas

https://bluuewhale.github.io/posts/building-a-fast-and-memory-efficient-hash-table-in-java-by-bor...
37•birdculture•1h ago•0 comments

What is the nicest thing a stranger has ever done for you?

https://louplummer.lol/nice-stranger/
148•speckx•1d ago•90 comments

Analysis finds anytime electricity from solar available as battery costs plummet

https://pv-magazine-usa.com/2025/12/12/analysis-finds-anytime-electricity-from-solar-available-as...
43•Matrixik•1h ago•30 comments

Cryptids

https://wiki.bbchallenge.org/wiki/Cryptids
47•frozenseven•1w ago•4 comments

SSE sucks for transporting LLM tokens

https://zknill.io/posts/sse-sucks-for-transporting-llm-tokens/
6•zknill•4d ago•2 comments

Java FFM zero-copy transport using io_uring

https://www.mvp.express/
76•mands•6d ago•27 comments

Z8086: Rebuilding the 8086 from Original Microcode

https://nand2mario.github.io/posts/2025/z8086/
20•nand2mario•3h ago•4 comments

macOS 26.2 enables fast AI clusters with RDMA over Thunderbolt

https://developer.apple.com/documentation/macos-release-notes/macos-26_2-release-notes#RDMA-over-...
506•guiand•22h ago•259 comments

EasyPost (YC S13) Is Hiring

https://www.easypost.com/careers
1•jstreebin•1h ago

Useful patterns for building HTML tools

https://simonwillison.net/2025/Dec/10/html-tools/
126•simonw•2d ago•42 comments

Photographer built a medium-format rangefinder, and so can you

https://petapixel.com/2025/12/06/this-photographer-built-an-awesome-medium-format-rangefinder-and...
123•shinryuu•6d ago•27 comments

Apple has locked my Apple ID, and I have no recourse. A plea for help

https://hey.paris/posts/appleid/
1337•parisidau•14h ago•761 comments

Go Proposal: Secret Mode

https://antonz.org/accepted/runtime-secret/
82•enz•3d ago•22 comments

How exchanges turn order books into distributed logs

https://quant.engineering/exchange-order-book-distributed-logs.html
97•rundef•5d ago•50 comments

Researchers seeking better measures of cognitive fatigue

https://www.nature.com/articles/d41586-025-03974-w
65•bikenaga•2d ago•11 comments

A Lisp Interpreter Implemented in Conway's Game of Life (2021)

https://woodrush.github.io/blog/posts/2022-01-12-lisp-in-life.html
65•pabs3•15h ago•2 comments

Indexing 100M vectors in 20 minutes on PostgreSQL with 12GB RAM

https://blog.vectorchord.ai/how-we-made-100m-vector-indexing-in-20-minutes-possible-on-postgresql
63•gaocegege•5d ago•10 comments

Show HN: LinkedQL – Live Queries over Postgres, MySQL, MariaDB

https://github.com/linked-db/linked-ql
16•phrasecode•5d ago•6 comments

A 'toaster with a lens': The story behind the first handheld digital camera

https://www.bbc.com/future/article/20251205-how-the-handheld-digital-camera-was-born
62•selvan•5d ago•29 comments

GNU Unifont

https://unifoundry.com/unifont/index.html
301•remywang•22h ago•70 comments

Computer Animator and Amiga fanatic Dick Van Dyke turns 100

187•ggm•10h ago•49 comments

Rats Play DOOM

https://ratsplaydoom.com/
366•ano-ther•22h ago•136 comments

Will West Coast Jazz Get Some Respect?

https://www.honest-broker.com/p/will-west-coast-jazz-finally-get
39•paulpauper•6d ago•18 comments

Dynamic Pong Wars

https://markodenic.tech/dynamic-pong-wars/
16•rendall•1w ago•2 comments

Beautiful Abelian Sandpiles

https://eavan.blog/posts/beautiful-sandpiles.html
113•eavan0•3d ago•17 comments

OpenAI are quietly adopting skills, now available in ChatGPT and Codex CLI

https://simonwillison.net/2025/Dec/12/openai-skills/
514•simonw•19h ago•297 comments

Show HN: I made a spreadsheet where formulas also update backwards

https://victorpoughon.github.io/bidicalc/
207•fouronnes3•2d ago•98 comments

Show HN: Tiny VM sandbox in C with apps in Rust, C and Zig

https://github.com/ringtailsoftware/uvm32
177•trj•20h ago•11 comments

Show HN: I audited 500 K8s pods. Java wastes ~48% RAM, Go ~18%

https://github.com/WozzHQ/wozz
5•wozzio•3h ago•4 comments