Innovations in the Nordstjernen Web Browser

roschdal2 pts0 comments

Innovations in the Nordstjernen Web Browser | by Andreas Røsdal | Jun, 2026 | MediumSitemapOpen in appSign up<br>Sign in

Medium Logo

Get app<br>Write

Search

Sign up<br>Sign in

Innovations in the Nordstjernen Web Browser

Andreas Røsdal

9 min read·<br>Just now

Listen

Share

Nordstjernen (the North Star) is a web browser written from scratch in C, built in Norway. It is a clean-room implementation — no Gecko, no WebKit, no Blink, nothing forked from an existing engine.<br>Where the rest of the industry has converged on three engines maintained by a handful of the largest companies on earth, Nordstjernen is small enough that a single human can read and audit it end to end: roughly 127,000 lines of C plus a thin C++/Qt shell. This article surveys what the browser does today, how it is built, the technical innovations that set it apart, and where it is going.<br>Press enter or click to view image in full size

Official Website: https://www.nordstjernen.org<br>Source Code: https://github.com/nordstjernen-web/nordstjernen<br>Current Features and Architecture<br>Nordstjernen is a real browser, not a toy. It targets the HTML and CSS standards directly — behaviour is measured against the WHATWG/W3C spec text, section by section, rather than against another browser’s quirks. The reference standards are the WHATWG HTML Living Standard, the WHATWG DOM Standard, the WHATWG URL Standard, and the W3C CSS specifications (the current CSS Snapshot plus the individual modules — Cascade, Flexbox, Grid, Transforms). As of mid-2026, the section-by-section walk-through of the in-scope HTML standard records 136 spec rows fully implemented, 27 partial, and 4 absent.<br>Small by Design<br>The single most important number in this whole document is the size of the source. Nordstjernen’s engine is about 120,000 lines of clean-room C (roughly 127,000 counting the thin C++/Qt shell). For comparison, the engines it competes with are cited at tens of millions of lines: Chromium is commonly estimated at around 35 million lines of code, and Firefox/Gecko at well over 20 million. Nordstjernen is therefore on the order of 200–300 times smaller than either.<br>That is not a vanity metric. A codebase one person can read end to end in a few weeks is a codebase that can actually be audited, reasoned about, and kept honest. Tens of millions of lines cannot be — not by any individual, and arguably not by any single team. Small is the security property, the maintainability property, and the independence property all at once: it is the reason a browser like this can exist outside a giant corporation at all.<br>Engine Stack<br>The pieces are deliberately small and vendored in-tree so there are no submodules and no surprise downloads:<br>* HTML to DOM, CSS, and URLs: The lexbor parser, forked in-tree and modified for tight integration. The same library provides the WHATWG URL implementation, so origins, IDN, and parsing all share one code path.<br>* JavaScript: The QuickJS interpreter (quickjs-ng fork), with DOM, Shadow DOM, observer APIs, Canvas 2D, and WebCrypto wired in. Crucially, no JIT (more on that below).<br>* WebAssembly: The full JS API (compile, instantiate, Memory, Table, externref) over a WAMR interpreter; it runs wasm-bindgen bundles.<br>* Images: Memory-safe decoding through Google’s Wuffs (PNG, GIF, BMP, JPEG), with libwebp for WebP and librsvg for SVG.<br>* Networking: HTTP/2 over libcurl, with HSTS, CSP, and partitioned cookies.<br>* Cryptography: crypto.subtle implemented directly over OpenSSL’s EVP APIs: hashing, HMAC, AES, RSA, ECDSA/ECDH, HKDF, and PBKDF2.<br>Rendering and the UI Shell<br>CSS cascade, flexbox, grid, transforms, gradients, and @keyframes are laid out and painted through GTK 4’s GSK renderer (a Qt 6 shell is also shipped). A minimalist presentation-MathML renderer puts equations inline on the text baseline. WebGL 1/2 is mapped onto OpenGL ES, opt-in per site and gated behind a trust prompt. An experimental WebGPU surface layers over external wgpu-native and stays off unless explicitly enabled.<br>Media, Kept Deliberately Tiny<br>Exactly one video codec is built in — MPEG-1, decoded in pure portable C by the vendored single-file pl_mpeg. An .mpg/.mpeg/.m1v video plays inline, honouring autoplay/loop/muted/poster and click-to-play. Audio (MP2 via pl_mpeg, MP3 via minimp3) plays through a small unsandboxed helper over SDL2. Everything else — other codecs, streaming blob: sources — is handed to an external player. There is no media stack to maintain or to be exploited.<br>Process-per-tab Isolation<br>Each tab’s engine runs in its own sandboxed nordstjernen-renderer process. The GTK/Qt application is a thin shell that blits the renderer’s shared-memory framebuffer and forwards input over an IPC control channel. A page that crashes — or is compromised — cannot take down the UI or reach its siblings. An optional --single-process mode trades the sandbox for footprint on low-memory machines and for debugging.<br>A Local-only AI Start Page<br>The about:start new-tab page is a chat with a small language...

nordstjernen browser small single lines shell

Related Articles