home » the workshop » Toy Browser
Learning in public
NEW!Toy Browser
A web browser from scratch in Python, following browser.engineering: sockets, TLS, an HTML parser, CSS and layout. A Rust rewrite comes next.
- access:
- private
- year:
- 2026
- built with:
- Python, Tkinter, Sockets
There’s no better way to understand the web than to build the thing that reads it. I’m working through Web Browser Engineering and writing my own browser in Python as I go.
So far it opens raw sockets, speaks HTTP over TLS, decodes HTML entities, builds a document tree with its own HTML parser, applies CSS with tag and descendant selectors, lays out blocks and text, and paints the result to a Tkinter canvas. Once it’s semi-functional, the plan is to rewrite the whole thing in Rust.
~ highlights ~
- A hand-written HTML parser and document tree
- A small CSS parser with cascade priority
- Block and inline layout painted through a display list
This one lives in a private repo. Ask me about it.