From your code to a running app
You write Clean code. Clean checks it and packs it into one small file. A server runs that file and gives your app what it needs, like a database.
Three steps from idea to app
New to programming? This is all you need to know to start.
You write
You describe what your app does in .cln files, in plain, readable code.
Clean checks and packs it
The compiler finds mistakes before anything runs, then packs your app into one small file.
Clean Server runs it
Your app answers visitors. It can only use what the server allows, so it stays safe.
Think of your app as a sealed letter, and the server as the post office: it delivers the letter and fetches what the letter asks for.
Six tools, one job each
Install one, and it brings the rest. Each tool has its own page with a short tutorial.
Installer and version manager
Installs the compiler, the server and the framework, and switches between versions.
Install Clean →Compiler
Checks every type and turns your code into WebAssembly. It also runs, tests and type-checks your code.
Get started →Frame framework
Routes, database models, login and pages in a few readable lines. No JavaScript.
Explore Frame →Clean Server
Runs your app in production. One program, no dependencies, with SQLite, PostgreSQL or MySQL.
Run in production →VS Code and Cursor
Highlighting, completion and errors as you type, from the same checker the compiler uses.
Open in Marketplace →AI assistant tools
Lets Claude, Cursor and other AI tools check and compile Clean code while they write it.
Connect your AI →The full picture
Three words you'll see below. WebAssembly is the small file your code becomes. The host is the program that runs it: Clean Server, or your browser. The host bridge is how your app asks the host for things like the database.
A Clean app is sealed in a sandbox. It can only use what the host offers, so a bug can't quietly reach your files or your network.
What happens when someone opens /api/notes
- Clean Server receives the request and finds the matching route inside
server.wasm. - Your handler runs in the sandbox and calls
Note.find. - That call becomes a request to the host: "run this query".
- Clean Server runs the query against the database and hands the rows back.
- Your handler turns them into JSON, and Clean Server sends the response.
Your code never touched a socket or a database connection. It only asked.
Safe, simple to ship, easy to change
Safe by design
WebAssembly can't open files, connect to the network or read memory outside its sandbox. The host decides what's allowed.
One file to deploy
No node_modules and no runtime to match. Copy the .wasm file next to Clean Server and start it.
Swap the outside, keep the code
Moving from SQLite to PostgreSQL changes a URL, not your app.
Small language, growing framework
Frame features are plugins, so new capabilities arrive without changing the language you know.
Learn it step by step
Short lessons that build on each other. Each one ends with code you can run.
Types and Conversions
Understand Clean Language's four core types and how to convert between them. The type system catches mistakes before they reach production.
Start →Functions in Depth
Write functions that call each other, return different types for different conditions, and build complex behavior from simple pieces.
Start →List Operations
Everything you can do with a list — add items, access by index, check membership, iterate, and build new lists from existing ones.
Start →The String Toolkit
A practical guide to Clean Language's string methods — the ones that appear in real programs, with examples that show when to reach for each one.
Start →Designing Classes
Bundle data and behavior into a class. Write a constructor, define methods, and create multiple independent instances from the same template.
Start →Class Inheritance
Extend a class with is and call the parent constructor with base(). Reuse behavior from a parent and add or override what the child needs.
Start →Contracts with require
State function preconditions explicitly. require is documentation and enforcement in one line — the compiler and runtime guarantee the contract is honored.
Start →Error Handling in Depth
Signal errors with error() and handle them at the call site with onError. Make error handling explicit, local, and readable.
Start →Iteration Patterns
Master all iteration forms — range, step, list, while, break, and continue. Know which pattern fits each problem.
Start →Language in Practice
Put it all together: build a word-frequency counter using classes, functions, lists, strings, and iteration. See how the pieces connect in a complete program.
Start →Common questions
Is WebAssembly only for the browser?
No. It started in browsers, but it's a general format. Clean uses it on the server, in the browser and on the command line.
Is it slower than a native program?
WebAssembly is compiled to machine code before it runs, so app code runs close to native speed. Database queries and network calls run in the host at full native speed.
What can my app do that the host doesn't offer?
Nothing, and that's the point. If a capability isn't offered, the app can't use it.
Do I need to understand this to use Clean?
No. cleen, cln and Frame handle all of it. This page is for when you're curious, or deciding whether Clean fits your project.
Try it in two minutes
Install the toolchain and run your first program.