LearnReferenceNotable programs

Notable programs and feats

The README of 1993 ended with a question: “Who can program anything useful with it?” [1] Useful is a matter of taste, but the answers are remarkable: a picture of the Mandelbrot set, interpreters for brainfuck written in brainfuck, a text adventure of two megabytes, a C compiler, and this site's own chat models. For each of the best-known programs: author, date, size, what it does and what it needs. The programs are described and linked, not reproduced.

At a glance

Notable programs, oldest first. "By hand" and "generated" say how the brainfuck was written, where the author tells. Sizes are from the source named in the section that each name links to.
ProgramByWhenSizeMade
The first examplesUrban Müller1993182 commands (hello.b)by hand
Interpreters in brainfuckFrans Faase; Daniel Cristofaniby 2003423 commands (dbfi)generated; by hand
Universal Turing machineDaniel Cristofaninot datednot countedby hand
Mandelbrot viewerErik Bosman2003about 11,600 bytesgenerated from macros
Lost KingdomJon Ripley2004 to 20052.08 megabytescompiled from BASIC
Game of LifeLinus Åkessonby 2009not statedby hand
awib, a compilerMats Linanderby 2014not statednot stated
A C compilershinh (ELVM), from Rui Ueyama's 8ccnot datednot statedcompiled from C
Tic-tac-toemitxela2017not statedby hand
Shortest "Hello, World!"KSab201872 commandsfound by search
lobotoml, a small neural networkAd1thnot dated9,731 bytesgenerated
A ray tracersee the section202623 megabytesgenerated
Four chat modelsthis site20261.03, 4.17, 7.71 and 11.43 billion commandsgenerated

The sizes in the table run from 72 to more than eleven billion. Here they are on one scale, where every step to the right is a thousand times more:

Notice the gap between the hand-written programs at the top and the generated ones at the bottom. On an even scale, if the shortest "Hello, World!" were 1 millimetre long, the biggest chat program would be about 159 kilometres. Sizes in bytes count the whole file, comments included, so they are a little more than the number of commands. The hatched bars are this site's own programs.

The first programs

The 1993 package came with six example programs by Müller himself [1]. Their names say what he thought needed showing: hello.b ("the ubiquitous Hello World!"), prime.b (prime numbers up to a limit you type), atoi.b (reads a number), div10.b and mul10.b (divide and multiply by ten), and varia.b ("small program elements like SWAP, DUP etc."). The last name is a trace of FALSE, the stack language that set him off: swap and dup are stack words.

hello.b has 182 commands (our count) and prints "Hello World!" and a new line. It builds each letter with a small multiplication and empties the cell with [-] between words. prime.b is a file of 4,100 bytes with comments in capitals, and is the largest of the six.

Hello, World!

Printing a greeting is the first program in every language. In brainfuck it became a contest: who can do it in the fewest commands?

The Esolang wiki calls the 72-command program "the shortest known" and adds what it needs: cells of one byte that wrap, and five cells to the left of the starting point [4]. So it is short, and it does not run everywhere (see the ends of the tape). Nobody has shown that 72 is the least possible.

The Mandelbrot viewer

Erik Bosman's program prints a picture of the Mandelbrot set, the best-known fractal, in text characters: 128 columns by 48 rows. Two larger versions print 256 by 96 and 512 by 192. The files in the Brainfuck Archive are dated 1 June 2003, and the program is about 11,600 bytes long [5].

It was not typed. Next to the program the archive holds the files it was made from: a small library of macros for arithmetic, comparison and loops, and a short main file [5]. It is the classic example of generating brainfuck.

The program reads no input, runs long and uses loops in every way an implementation must handle. That made it the standard test of speed: both of the best-known articles on making brainfuck fast use it [6] [7], and the author of the language showed a picture made by it in his talk and asked: "why?" [8]

Brainfuck in brainfuck

An interpreter for a language, written in that same language, is called a self-interpreter. It is a classic test of whether a language can do "real" work.

Both take their input in the same way: first the program to run, then an exclamation mark, then the input for that program [9] [10]. This is where the ! convention comes from (see smaller differences). And since dbfi is a brainfuck program, it can run itself running another program, as deep as your patience allows.

A universal Turing machine

Cristofani's utm.b is a brainfuck program that behaves as a universal Turing machine: one fixed machine that can imitate any other. He took a very small one from a paper by Yurii Rogozhin (1996) and wrote it out in brainfuck with a long commentary. In his words it gives "a very direct proof that brainfuck is Turing-complete" [12]. The page on theory says what that proof assumes.

Quines

A quine is a program that prints its own text. In a language without strings this takes care: the program must hold a description of itself as numbers on the tape, print the commands that make those numbers, and then print the rest. Known brainfuck quines are by Brian Raiter [13], whose quine Müller showed in his talk with the words "I don't know where to begin" [8], by Erik Bosman, whose quine is the example on the Esolang wiki [4], and by Daniel Cristofani, who offers several [14].

The brainfuck.org collection

The largest body of hand-written brainfuck by one person is Daniel Cristofani's, on brainfuck.org [14]. Besides the interpreter of Brainfuck in brainfuck and the universal machine of A universal Turing machine it includes sorting programs (bubble sort, insertion sort, quicksort), programs that print the digits of e and of the golden ratio, endless Fibonacci numbers, factorials and squares, Conway's Game of Life, a tic-tac-toe player, a word counter like the Unix tool wc, a random number generator built on a cellular automaton, and a translator from brainfuck to C. Many are commented line by line, and his series "get good at brainfuck" walks through them in the order they were written [15].

He licenses the programs under Creative Commons Attribution-ShareAlike 4.0 [14]. If you want to learn how good brainfuck is written, this is the place.

Games

Lost Kingdom (Jon Ripley, 2004 to 2005)
A text adventure: you type commands such as directions and the program describes where you are. Ripley first wrote it in BBC BASIC for a contest of adventures in two kilobytes, which it won in 2004; the original was 2.74 kilobytes. The brainfuck edition is 2.08 megabytes [16]. It was made with BFBASIC, a compiler from BASIC to brainfuck [17]. Ripley's page calls it the world's first brainfuck text adventure and, more carefully, "probably the largest program ever written in Brainfuck" at that time [16]. We cannot check either claim, and the second has since been overtaken.
Game of Life (Linus Åkesson)
Conway's cellular automaton on a board with rows and columns named by letters. You type two letters to switch a cell on or off, and press Enter for the next generation. Written by hand; the author says comments and white space made that possible [18]. The page has reader comments from 2009 on.
Tic-tac-toe (mitxela, 2017)
You play against the program by typing a number from 1 to 9. Written over the weekend of 6 May 2017; the commented source is published next to the stripped one. The author left a few ways for the player to win on purpose [19]. Cristofani's collection has a tic-tac-toe player as well [14].

Compilers written in brainfuck

awib (Mats Linander)
A brainfuck compiler written in brainfuck. It reads a brainfuck program and writes it out as C, as a Linux program for Intel processors, or as code in Tcl, Go, Ruby, Java or Rust. It optimises too: it merges runs of commands and turns clearing, copying and multiplying loops into single operations. And the source of awib is at once valid brainfuck, Tcl, C and bash [20].
A C compiler (ELVM)
ELVM is a tool chain by shinh that compiles C to a very simple intermediate form and from there to some sixty languages, brainfuck among them. Its README says the first aim was to run a Lisp interpreter in brainfuck. Because the C compiler it uses, a version of Rui Ueyama's 8cc, is itself written in C, the tool chain can compile its own compiler: the README lists "8cc in Brainfuck" among the results. The output needs 8-bit cells [21].

For compilers that produce brainfuck from BASIC or C, see Writing real programs. For compilers that turn brainfuck into something faster, see Implementations.

A program as an argument

When courts in the United States dealt with a short program that unscrambles DVDs, David Touretzky of Carnegie Mellon University collected versions of it in every form he could find, to argue that there is no clear line between a program and other ways of writing down the same method. One exhibit is the descrambler in brainfuck, from an anonymous author, which the gallery calls "a truly minimalist description of the algorithm" [22].

A ray tracer

The newest entry. An article of 24 September 2026 describes a ray tracer in brainfuck: a program that computes a picture of shiny spheres by following rays of light, after the scene of a well-known tutorial. The author wrote a small language and a code generator for it. By the author's account the program is 23 megabytes; a first estimate was about one pixel per minute for a picture of 400 by 225; and at the time of writing 1,229 pixels had been computed, of which 10 differed slightly from a reference version in C [23]. We have not run it.

Neural networks

lobotoml, by Ad1th, compiles a small neural network into brainfuck. The network has 7 neurons (2 inputs, 4 in the middle, 1 output) and computes XOR: whether exactly one of two inputs is on. It is trained in Python, its weights are rounded to whole numbers, and a generator writes a brainfuck program of 9,731 bytes. By its README the brainfuck version gives the same answers as the whole-number version in Python, and one run takes about 5.8 million commands [24]. The README is frank that larger networks would be far too slow this way.

A related line of research uses brainfuck as raw material. In "Computational Life" (2024), Blaise Agüera y Arcas and colleagues filled a "soup" with random programs of 64 bytes in a variant of brainfuck in which a program and its data share one tape, and watched programs that copy themselves arise without being designed [25].

This site's project: four chat models

The project this site began with belongs in this list as one entry among the others. Four published chat models were each written out as a single brainfuck program. A model is a long list of numbers (weights) and a fixed recipe of sums. Almost all of each program writes those numbers onto the tape; the last part does the sums. The only thing a program reads is the question, and the only thing it prints is the answer [26].

brnfck-qwen3.5-0.8b runs Qwen3.5-0.8B, the smallest model with the same kind of layers as Qwen3.8-27B, a much larger model. 18 of its 24 layers are of another kind, Gated DeltaNet, explained on Compare the models. The program follows its whole-number recipe exactly; Ask it yourself on that page runs the model in floating point with its DeltaNet layers in whole numbers, close to the program but not what it computes. The tape after its writing part equals the loaded model in 1,018 checksums. You can ask it a question in the chat with brnfck-qwen3.5-0.8b.

The four programs. Counts are counted in the program files; times were measured on one desktop computer [26].
Whatbrnfck-smollm2-135mbrnfck-qwen2.5-0.5bbrnfck-qwen2.5-1.5bbrnfck-qwen3.5-0.8b
ModelSmolLM2-135M-Instruct (Hugging Face)Qwen2.5-0.5B-Instruct (Alibaba Cloud)Qwen2.5-1.5B-Instruct (Alibaba Cloud)Qwen3.5-0.8B (the Qwen team of Alibaba Cloud)
Commands in the program counted1,030,902,3804,169,659,60811,430,468,8807,709,034,855
Tape, in cells of 32 bits counted188,012,789657,597,1141,827,870,0141,067,424,772
Time for one word piece measured0.6 to 1.0 sabout 2.3 s7 to 12 s on the command line; 9.0 s in the browserabout 5.6 s in the browser; 5.56 s on the command line (median)
Same next word piece as the original model measured94.8% (345 of 364)96.6% (477 of 494)97.2% (318 of 327)95.1% (214 of 225), its whole-number version against the original

Its limits, stated plainly:

Has it been done before? lobotoml (Neural networks) ran a small neural network in brainfuck earlier. We looked for an earlier language model or chat model in brainfuck and found none. Our search was limited, so we do not claim to be the first [26].

Read how it works, look inside the program, or ask a model a question.

Limits

Read next

Notes and sources

Where a source is a community wiki or the author's own account, the entry or the text says so.

  1. Urban Müller, brainfuck-2.lha, Aminet, dev/lang, dated 9 June 1993: the package page on Aminet. We read the files in the archive: README, bfc.asm (the compiler), bfi.c (the interpreter) and the six example programs. Sizes and dates are those of the archive listing. Opened 11 October 2026.
  2. Wikipedia, "Brainfuck": the Wikipedia article. Used for orientation and for its list of references, not as evidence. Opened 11 October 2026.
  3. Code Golf Stack Exchange, answers to the "Hello, World!" challenge: the answer by KSab (27 April 2018, 72 bytes) and the answer by primo (3 January 2016, 78 bytes). Read through the Stack Exchange API. Opened 11 October 2026.
  4. Esolang wiki, "Brainfuck": the wiki article on brainfuck. A community wiki; we use it for conventions and for its list of results, and name it where it is our only source. Opened 11 October 2026.
  5. Erik Bosman, Mandelbrot set viewer, files dated 1 June 2003, in the Brainfuck Archive: the mandelbrot directory with its README.txt. Opened 11 October 2026.
  6. Mats Linander, "brainfuck optimization strategies", 7 January 2015: the article on calmerthanyouare.org. Opened 11 October 2026.
  7. Eli Bendersky, "Adventures in JIT compilation: Part 1, an interpreter", 20 March 2017: part 1 on eli.thegreenplace.net. Opened 11 October 2026.
  8. Urban Müller, talk at Tamedia TX, 2017, read as the community transcript on the Esolang wiki: Tamedia TX 2017 transcript. The transcript says its last page is missing. Wikipedia gives the title as "Brainfuck, or how I learned to change the problem" and the date as 13 June 2017; we did not watch the recording. Opened 11 October 2026.
  9. Frans Faase, "BF interpreter written in BF": the interpreter page on iwriteiam.nl. Opened 11 October 2026.
  10. Daniel B Cristofani, dbfi.b: the self-interpreter on brainfuck.org. The count of 423 commands is ours, of the file without its closing comment. Opened 11 October 2026.
  11. Oleg Mazonka and Daniel B. Cristofani, "A Very Short Self-Interpreter", arXiv:cs/0311032, 21 November 2003: the abstract on arXiv. We read the abstract only. Opened 11 October 2026.
  12. Daniel B Cristofani, utm.b: the universal Turing machine on brainfuck.org. Its comments name the machine it implements: Yurii Rogozhin, "Small universal Turing machines", Theoretical Computer Science 168(2) (1996), 215 to 240, which we did not open. Opened 11 October 2026.
  13. Brian Raiter, "Brainfuck: An Eight-Instruction Turing-Complete Programming Language": the brainfuck page on muppetlabs.com. Opened 11 October 2026.
  14. Daniel B Cristofani, brainfuck.org: the main page. The page licenses his programs under Creative Commons Attribution-ShareAlike 4.0. Opened 11 October 2026.
  15. Daniel B Cristofani, "get good at brainfuck": the series on brainfuck.org. Opened 11 October 2026.
  16. Jon Ripley, "The Lost Kingdom Brainfuck Edition", 2004 to 2005: the game's page on jonripley.com. Opened 11 October 2026.
  17. Esolang wiki, "BFBASIC": the wiki article on BFBASIC. Opened 11 October 2026.
  18. Linus Åkesson, "Game of Life in Brainfuck": the page on linusakesson.net. Opened 11 October 2026.
  19. mitxela, bf-tic-tac-toe, 2017: mitxela/bf-tic-tac-toe on GitHub. Opened 11 October 2026.
  20. Mats Linander, awib, README dated 14 September 2014: matslina/awib on GitHub. Opened 11 October 2026.
  21. shinh, ELVM Compiler Infrastructure, README: shinh/elvm on GitHub. Opened 11 October 2026.
  22. David S. Touretzky, "Gallery of CSS Descramblers", Carnegie Mellon University: the gallery at cs.cmu.edu. Opened 11 October 2026.
  23. "Writing a ray tracer in Brainfuck", 24 September 2026: the article on epestr.com. All figures are the author's own. Opened 11 October 2026.
  24. Ad1th, lobotoml: Ad1th/lobotoml on GitHub. All figures are from its README. Opened 11 October 2026.
  25. Blaise Agüera y Arcas and others, "Computational Life: How Well-formed, Self-replicating Programs Emerge from Simple Interaction", arXiv:2406.19108, 2024: the abstract on arXiv and the full text. Opened 11 October 2026.
  26. This site's own project. Counts and measurements are on How it works: the numbers and How do I know it is real?; the earlier work we know of is under Has this been done before?. Opened 11 October 2026.