Gleam is a friendly language for building type-safe, scalable systems! ✨

Get Started
Kindly supported by

Why Gleam?


Gleam's powerful static type system helps find and prevent bugs at compile time, long before it reaches your users. It also serves as a productive refactoring tool, enabling programmers to confidently make large changes to unfamiliar code, quickly and with low risk.

For problems the type system can't solve (such as your server being hit by a bolt of lightning) the Erlang virtual machine provides well tested mechanisms for gracefully handling failure.


Hunting down bugs can be stressful so Gleam's compiler provides clear and helpful feedback about any problems. We want to spend more time developing features and less time looking for bugs or deciphering cryptic error messages.

As a community we want to be friendly too. People of all backgrounds, genders, and experience levels are welcome and must receive equal respect. See our community code of conduct for more.


Gleam builds on top of the Erlang virtual machine, a best-in-class runtime that has enabled companies such as Discord, Ericsson, Heroku, and WhatsApp to provide low-latency services at a global scale. Gleam takes full advantage of the Erlang runtime and adds no overhead of its own, so all Gleam programs are as fast and as efficiently multi-threaded as their Erlang counterpart.

Erlang compatible

Gleam makes it easy to use code written in other BEAM languages such as Erlang, Elixir and LFE, so there's a rich ecosystem of thousands of open source libraries for Gleam users to make use of.

In return Gleam code can be easily used by programmers of other BEAM languages, either by transparently making use of libraries written in Gleam, or by adding Gleam modules to their existing project with minimal fuss.



Hello, world! The classic example program that prints "Hello, world!" to the console.
import gleam/io

pub fn main() {
  io.println("Hello, world!")
A basic web server This little web server responds with the text "Hello, world!" to any HTTP request made to it.
import gleam/io
import gleam/bit_builder
import gleam/http/elli
import gleam/http/response

pub fn my_service(_req) {
  let body = bit_builder.from_string("Hello, world!")
  |> response.set_body(body)

pub fn main() {
  elli.become(my_service, on_port: 3000)
The web server created by this code is fully asynchronous and multi-threaded, seamlessly making use of all the cores of your computer without tricky locks, callbacks, or promises.
Multi-threaded hello world Thanks to the powerful Erlang virtual machine Gleam programs can spin up hundreds of thousands of threads (called processes) without any trouble. Here's "Hello, World!" being printed by a thousand processes concurrently.
import gleam/io
import gleam/int
import gleam/list
import gleam/string
import gleam/otp/process

pub fn main() {
  list.range(0, 1000)
  |> list.each(process.receive(_, 3)) // Wait for them to finish

fn start_process(i) {
  process.start(fn() {
    let message = string.append("Hello world: ", int.to_string(i))
In addition to this low-level process abstraction Gleam has helpful libraries full of building blocks for writing type safe and fault tolerant multi-core programs as quickly as possible.

Let's go

Still interested? Try out getting started guide:

Get Started