Forth · online compiler

Run Forth online

Run Forth online — stack-based, concatenative, browser-hosted.

Version
Firecracker microVM live per-test verdicts multi-file compile

Forth is the stack-based, extensible language behind decades of embedded systems, boot loaders (Open Firmware), and NASA spacecraft. Two-word REPL, tiny footprint, endlessly expressive.

ls-judge runs gforth (the GNU Forth) in a Firecracker microVM.

Starter code

What you get in Forth

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

forth
Forth 0
pad 64 stdin read-line drop drop pad swap evaluate 2 * . cr
stdin →21
expected →42
FAQ

Common questions about Forth on ls-judge

Which Forth?
gforth (GNU Forth).
ANS Forth compliant?
gforth is ANS-conformant with modern extensions.
Free?
Yes.
Entry filename?
main.fs — loaded via `gforth`.
Further reading
Also try