Zig · Interactive Curriculum

Learn Zig Online
With a Zig Playground

A free interactive Zig tutorial with an online compiler for comptime, allocators, C interop, manual memory management, SIMD, and systems programming practice.

25Lessons
100+Code Examples
FreeForever
Try Zig in 30 seconds
1const std = @import("std");
2
3pub fn main(init: std.process.Init) !void {
4 var buffer: [1024]u8 = undefined;
5 var stdout_writer = std.Io.File.stdout().writer(init.io, &buffer);
6 const stdout = &stdout_writer.interface;
7
8 try stdout.print("Hello, Zig!\n", .{});
9 try stdout.flush();
10}
30 sec demo

Why Learn Zig?

Discover the benefits of learning Zig for systems programming.

No Hidden Control Flow

Predictable code with no hidden allocations, exceptions, or operator overloading.

C Interoperability

Seamlessly integrate with existing C libraries and codebases.

Compile-Time Execution

Run any code at compile time for zero-cost abstractions.

All Zig Lessons

Browse the complete ordered curriculum. Each lesson has a readable page you can link to and share.

Frequently Asked Questions

Can I learn Zig here for free?
Yes. LearningZig.org is free, with lessons and an online Zig playground that take you through comptime, allocators, C interop, pointers, build systems, and systems programming.
Can I run Zig without installing it?
Yes. The playground compiles and runs Zig right in the browser, which is handy for trying things out before you set up a local toolchain.
Is this worth it if I already write C or Rust?
Yes. There are paths aimed at systems programmers, so you can see how Zig handles allocators, comptime, C interop, error handling, and low-level control and weigh it against what you already do in C, C++, or Rust.
What should I learn first in Zig?
Start with the fundamentals, variables, functions, control flow, arrays, structs, and error handling, then get a feel for memory allocators and comptime before you take on C interop and build systems.