Welcome to HCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Welcome to HCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Compile and run Erlang code online instantly with HCODX. Our free cloud-based Erlang compiler supports real-time execution, standard input, syntax highlighting, and code download. No installation or configuration required. Start coding in Erlang now.
Run Erlang instantly without installing any IDEs or configuring environments. Our cloud-based Erlang handles libraries, runtimes, and dependencies automatically so you can focus on writing code.
Whether you are studying algorithms in Erlang, practicing data structures in Erlang, or exploring functional programming, our tool provides real-time stdout/stderr feedback with interactive standard input support.
HCODX is a free online compiler and code runner: write code in your browser, execute it on a cloud sandbox, and interact with your program through a live terminal. Students use it for coursework and interview practice; developers use it to test snippets in 85+ languages without setting up a local environment.
Ericsson engineers designed Erlang in 1986 to run telephone switches that were never allowed to stop — and that requirement produced a language decades ahead of its time. Lightweight processes, message passing, supervision trees, and hot code swapping let systems achieve legendary uptime; WhatsApp famously served hundreds of millions of users with a tiny Erlang team, and RabbitMQ, CouchDB, and much telecom infrastructure run on it today. The runtime (BEAM) is actively developed, with OTP 27 and 28 as recent releases. Erlang is also academically significant as the canonical actor-model language, cited in virtually every concurrency course. Here you can execute Erlang in a live terminal — io:get_line reads what you type mid-run, with zero toolchain setup.
main(_) ->
Name = string:trim(io:get_line("What's your name? ")),
io:format("Hello, ~s! Spawning a process for you.~n", [Name]),
Parent = self(),
spawn(fun() -> Parent ! {note, "delivered by a lightweight process"} end),
receive
{note, Msg} -> io:format("Message ~s~n", [Msg])
end,
{ok, [N]} = io:fread("Factorial of what number? ", "~d"),
io:format("~b! = ~b~n", [N, fact(N)]).
fact(0) -> 1;
fact(N) when N > 0 -> N * fact(N - 1).
Erlang shows up in two career paths: distributed-systems engineering (messaging infrastructure like RabbitMQ, telecom, IoT backends) and as the foundation beneath Elixir, where understanding OTP concepts distinguishes senior candidates. Concurrency and programming-languages courses assign Erlang to teach the actor model, immutability, and pattern matching with guards — exactly the constructs you can drill on this page. It's also the fastest way to test recursion patterns, list comprehensions, and message-passing snippets from Armstrong's 'Programming Erlang' without configuring rebar3 or a local OTP release. HCODX is a free online Erlang editor, runner and interpreter — an IDE-grade compiler and playground to write and run code online, execute code with live output and live preview, no downloads or web server required.
Yes. io:get_line and io:fread block the running program until you enter a line in the terminal, and io:format output appears immediately beforehand — so prompts and answers interleave live, like an escript run in a local shell. Sequential interactive prompts work without any special handling.
Write it script-style with a main/1 entry point, as in the example: execution starts at main and you can define additional functions below it with the usual clause-and-guard syntax. This mirrors how escript runs single files, so translating your code into a proper -module(...) later is mechanical.
The standard library and OTP modules that ship with Erlang (lists, maps, string, ets, gen_server and other behaviours) are present — no external packages, no rebar3 dependencies, single file only. Full supervision-tree applications are awkward in one script, but you can absolutely exercise processes, messages, and ets tables.
Your current code will be replaced with the default sample. This cannot be undone — download your code first if you want to keep it.
You have unsaved changes. Do you want to save your code before continuing?