TeXbrain - LaTeX editor with in-browser pdfTeX via WASM

Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

TeXbrain is a free, open-source LaTeX editor that runs entirely in your browser, compiling .tex files to PDF locally using a WebAssembly port of pdfTeX. No accounts, installs, or servers—just open a tab and write. It features live PDF preview, real-time collaboration, full git integration, local file system access, and on-demand package loading from CTAN. Built with SvelteKit, CodeMirror 6, and isomorphic-git, it works offline and prioritizes privacy with no telemetry. Ideal for students, researchers, and writers who want a seamless, self-contained LaTeX experience.

I built this because I was tired of paying for features that should be free. I wanted something that just works. Open a browser, write LaTeX, get a PDF. So I built it.
  1. kccqzy

    Does this work on Firefox or Safari? You say “Firefox or Safari fall back to a virtual filesystem” but somehow I can’t get this fallback to work. When I click New Project I just get a reminder to use Chrome or Edge. Is there a button to press to trigger the fallback?

  2. raybb

    I love this use of wasm!

    I never really got the hang of LaTeX but I've really enjoyed Typst the past few years and even made a few books with it. Have you ever tried that or have thought on it?

  3. kccqzy

    I copy-pasted a random LaTeX doc from many years ago (I made sure I wrote it before 2020 so it did not use any new features not in TeX Live 2020), and upon compilation I got the error

    Font OT1/cmr/m/n/10.95=cmr10 at 10.95pt not loadable: Bad metric (TFM) file.

    on line 13017. The document had only 200 lines so this must be from a package. It was really not clear where the error was coming from. I guessed that it was coming from \usepackage{microtype}, so I commented it out, but the same error persisted.

    I decided to hard refresh the tab and this time I got a different error:

    TeX capacity exceeded, sorry [text input levels=15].

    on line 39. Again it was unclear line 39 of which package.

More from this day

2026-08-25