WasmPascal
Compile and Run Pascal in WebAssembly Directly in the Browser
Try WasmPascal Live
Experience the full in-browser Pascal IDE, multi-file compiler, themes, and interactive game examples at the official website.
Open wasmpascal.com →What is WasmPascal?
WasmPascal is an in-browser Pascal development environment and compiler written from scratch in the
Odin programming language.
The compiler runs directly inside the client as a WebAssembly module. You can write or paste standard Pascal code,
hit Run, and watch it compile straight to .wasm bytes and execute immediately on the same page.
No local installation, no command-line toolchain, and no server-side compilation are required. Everything executes entirely in your browser.
Highlights & Capabilities
⚡ 100% In-Browser Compilation
The compiler runs as a WebAssembly worker. It performs preprocessing, lexing, parsing, semantic analysis, and WebAssembly binary code emission directly in the browser with near-instant build times.
📟 Classic Turbo Pascal CRT
Supports classic console routines including write, writeln, readln,
GotoXY, ClrScr, TextColor, TextBackground, and Delay
rendered into a fixed-width character grid.
🎮 Canvas Graphics & Sound ABIs
Build full interactive 2D games using modular host ABIs: batchiness for batched canvas drawing and Web Audio effects,
pascaldom for event-driven DOM canvas apps, or basic_canvas for direct pixel manipulation.
📦 Multi-File Units & Modern Syntax
Supports uses units, records, variant records, bitmask sets (set of <ordinal>),
conformant arrays, procedural parameters, Delphi 13-style ternary expressions, and dynamic heap allocation (New/Dispose, GetMem/FreeMem).
🚀 Standalone Web Exports
Export any compiled program into a ready-to-host standalone web bundle (.zip) or a single self-contained .html file
that opens directly from disk with zero external dependencies.
🎨 Classic IDE Themes
Ships with a CodeMirror 6 editor supporting custom retro themes: classic Turbo Pascal 7 (DOS blue), Borland Pascal (navy), FreePascal (royal blue), and a modern dark theme.
Built with WasmPascal
PPEE (Pascal Portable Executable Explorer) is a real-world application
powered by WasmPascal: drop a Windows .exe or .dll onto the page
and its Pascal-compiled WebAssembly engine inspects the PE headers, sections, imports,
resources, signatures, and strings — entirely in your browser, with no uploads.
Learn Pascal from Scratch
The Learn Pascal tutorial that ships inside WasmPascal is also available here as a written, fifteen-lesson series. It assumes no prior Pascal and no toolchain: you start with your very first program and work up through types, control flow, records and pointers, sets, units, objects and classes, and finally the host ABIs that let a Pascal program draw to a canvas or drive the DOM.
Development Journey & Articles
Read about how WasmPascal was designed, built, and expanded with new language features, flight sims, and retro game ports on the blog:
More In-Browser Compilers
Prefer Java over Pascal? WasmCoffee is the sibling project: an in-browser compiler written in Odin that compiles Java-inspired source directly to WebAssembly (Wasm-GC) bytecode on the same page.
Ready to write some Pascal?
Launch the playground and explore demo games like Flight Leader, Xonix, Minesweeper, and Pong.
Visit wasmpascal.com →