Translate English text into Chef, the esoteric programming language created by David Morgan-Mar where every program is a valid cooking recipe. Each character becomes a food ingredient (e.g. haricot beans = H, eggs = e, lard = l), and the generated recipe is genuine executable Chef source code — paste it into any Chef interpreter and it will print your original message. Reverse translation executes Chef programs back to text.
Enter some text and click Translate to see the result
Chef is an esoteric programming language created by David Morgan-Mar in 2002. Its central constraint is that every valid program must also read as a plausible cooking recipe — complete with a title, an ingredients list with quantities, and a method written in culinary prose. Variables are ingredients, stacks are mixing bowls, output buffers are baking dishes, and the program terminates with Serves N.
Despite the whimsical surface, Chef is Turing-complete. Loops are written as
Verb the ingredient /
Verb the ingredient until verbed,
arithmetic uses Add, Remove, Combine, and Divide, and
subroutines are auxiliary recipes that can call each other. A Chef program can compute anything
a conventional language can — it just looks like it belongs on a restaurant menu.
Chef programs operate on one or more numbered mixing bowls (LIFO stacks) and baking dishes (output buffers). Ingredients hold numeric values; liquefied ingredients output as ASCII characters, dry ingredients as raw numbers.
| Instruction | What It Does |
|---|---|
| Put X into mixing bowl | Push ingredient X onto the mixing bowl stack |
| Fold X into mixing bowl | Pop top of mixing bowl into ingredient X |
| Add X to mixing bowl | Add X's value to the top of the mixing bowl |
| Remove X from mixing bowl | Subtract X's value from the top of the mixing bowl |
| Combine X into mixing bowl | Multiply top of mixing bowl by X |
| Divide X into mixing bowl | Divide top of mixing bowl by X (integer) |
| Liquefy X | Mark ingredient X as character-mode output |
| Liquefy contents of mixing bowl | Mark all items in bowl as character-mode |
| Pour contents of mixing bowl into baking dish | Copy entire mixing bowl onto the baking dish |
| Serves N | Print baking dish top-first and end the program |
| Verb the ingredient | Loop start — skip to matching close if ingredient = 0 |
| Verb the ingredient until verbed | Loop end — jump back to open if ingredient ≠ 0 |
| Refrigerate | Output baking dish and halt immediately |
Each character in your text maps to a named food ingredient whose quantity equals the character's ASCII value. The translator uses a fixed, canonical ingredient list so that every program it generates is human-readable and consistent. Here are some of the most common mappings:
| Character | ASCII | Ingredient |
|---|---|---|
| H | 72 | haricot beans |
| e | 101 | eggs |
| l | 108 | lard |
| o | 111 | oil |
| W | 87 | walnuts |
| r | 114 | raisins |
| d | 100 | dark rye flour |
| (space) | 32 | greens |
| ! | 33 | anise seeds |
| a | 97 | apple juice |
| s | 115 | salt |
| t | 116 | tarragon |
Chef belongs to a lineage of deliberately constrained programming languages that began with Brainfuck (Urban Müller, 1993) and includes COW (moo-based Brainfuck), Chicken (unary chicken-word encoding), Whitespace (only spaces and tabs are significant), and Malbolge (designed to be unprogrammable). What sets Chef apart is its aesthetic dual-use: a well-written Chef program can pass as an actual recipe, and David Morgan-Mar's original specification even recommends that authors ensure their programs are gastronomically plausible.
The language has attracted a dedicated community of programmers who write both functional programs and genuinely edible recipes — a subset of the esolang world that takes the culinary constraint seriously. Morgan-Mar himself later created Piet (programs as abstract pixel art) and dozens of other esolangs, cementing his reputation as one of the most imaginative figures in the field.
This translator converts any English text into a complete, valid Chef recipe program. Each unique character
in your input is assigned a food ingredient whose quantity equals the character's ASCII value. Characters
are then pushed onto the mixing bowl in reverse order — so that when the bowl is served
(top-first), the output appears in the correct reading order. The recipe ends with
Liquefy contents of the mixing bowl
(so all values output as characters rather than numbers) followed by
Serves 1.
The translator also works in reverse: paste any Chef program into the input box and it will execute it, returning the output. The built-in interpreter supports the full core instruction set including arithmetic, mixing-bowl stacks, baking-dish output buffers, liquefaction, and loops. The translation API is available for developers who want to integrate Chef encoding into their own applications.
Put haricot beans into the mixing bowl. Put eggs into the mixing bowl. Liquefy contents of the mixing bowl...