Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM
TeXbrain is a static, no-backend LaTeX editor that compiles pdfTeX to WebAssembly, runs entirely in the browser, and syncs with local folders via the File System Access API.
TeXbrain, a browser-based LaTeX editor built by a master's engineering student, launched publicly on August 25, 2026, per a Show HN post by its author. The tool runs pdfTeX compiled to WebAssembly entirely in the browser, with no server-side processing and no account required.
The editor is a static site hosted at tex.swimmingbrain.dev and is also available for self-hosting under an MIT license on GitHub (the bundled pdfTeX engine carries EPL 2.0 / GPL 2.0 terms). Chromium-based browsers get direct local folder access through the File System Access API, while Firefox and Safari fall back to a virtual filesystem. Built-in Git support is provided via isomorphic-git, covering clone, branch, commit, push, and pull without requiring a terminal. No analytics are collected, and after the first load the editor functions fully offline.
The author describes building TeXbrain in free time as a direct response to Overleaf's paywall on Git sync, wanting a setup where files live in a single folder on disk and remain accessible to other tools — local TeX installs, local AI agents, or any editor. The project has already been used by outside users writing theses, and its first external pull request has landed, per the HN post.
A notable piece of the implementation is the package-loading layer. The pdfTeX engine binary itself is 1.8 MB; when it requests a file it doesn't have, a service worker resolves it in order through Cache Storage, a small bundled subset, a TeX Live tree mirrored on jsDelivr, and finally a SwiftLaTeX-style server as a last resort. Files are fetched at most once, and after the first successful compilation a core subset is prefetched in the background to support offline use. Only file names travel over the network — document content stays local.
The author is candid about current limitations. Only pdfTeX is supported; XeTeX and LuaTeX are absent, meaning packages like fontspec and polyglossia won't work. Package versions are pinned to the TeX Live 2020 era to stay coherent with the engine's format file. BibTeX and Biber are not yet integrated, which the author flags as "maybe the roughest edge." The stated target audience is people on work laptops, Chromebooks, or university lab machines where installing TeX Live isn't practical — not a replacement for established local setups.
The HN post invites bug reports by package name or reproducible case, and notes that outside reports have driven most of the development work over the past summer.
No comments yet — start the thread.