History
In 1993 Urban Müller looked after a large archive of Amiga software. Someone uploaded a language called FALSE whose compiler was only 1,024 bytes long. Müller wanted a smaller one, and got it by making the language simpler [1]. The package he published in June 1993 holds a compiler of 240 bytes [2]. The language turned out to be nearly the same as one that the logician Corrado Böhm had described in 1964 [3].
1993: a compiler of 1,024 bytes, and a smaller one
The author tells it himself in a talk he gave in 2017 [1]. In 1993 he was moderating what he calls the largest Amiga software archive. This was Aminet, which he had founded the year before [4]. One day someone uploaded a programming language called FALSE. Its compiler was 1,024 bytes long, which he found "ridiculously small".
FALSE was the work of Wouter van Oortmerssen, who designed it in 1993 with a compiler of "just 1024 bytes", written in 68000 assembler, the machine language of the Amiga's processor [5]. It is a language with a stack, variables, functions without names, and conditions and loops [6].
His first reaction: "Can we do better?" [1] Improving on the size of the compiler for that language would have been hard. He chose another way: "if the program doesn't fit the problem, change the problem" [1]. He took things out of the language until almost nothing was left. Numbers written out became "add one, many times". Variables with names became cells on a tape. FALSE's loop became a plain "while" [1]. What remained were eight commands.
The original package
The package is still where it was put: the file brainfuck-2.lha on Aminet, dated 9 June 1993 [2]. It is 10 kilobytes and holds eleven files:
- README
- 2,863 bytes: the language, the compiler, the interpreter
- bfc
- the compiler, 240 bytes
- bfc.asm
- its source, in 68000 assembler
- bfi, bfi.c
- an interpreter "for debugging" and its source in C, 1,047 bytes of text
- six programs
- hello.b, prime.b, atoi.b, div10.b, mul10.b, varia.b
The "2" in the name is a version number. Under the heading "WHATS NEW" the README says [2]:
"Yes, I squeezed another ridiculous 56 bytes out of the compiler. They have their price, though: The new compiler requires OS 2.0, operates on a byte array instead of longwords, and generates executables that are always 64K in size."
Three facts follow from this passage.
- There was an earlier version, of 296 bytes. 240 plus 56 is 296. That is the figure Wikipedia and a recent book give for the first compiler [7] [8]. We found no copy of that first version: Aminet lists only this second one and a port to another language uploaded in 2022.
- The first version had cells of 32 bits. A "longword" on the Amiga is 32 bits. The familiar cell of one byte came with the second version, as a way to save space in the compiler.
- The small size had a price. Every compiled program is 65,536 bytes long, whatever it does, and needs version 2.0 of the Amiga's operating system.
The README thanks Chris Schneider "for his ideas how to make the compiler shorter", and the short description on Aminet ends with a question that people have been answering ever since: "Who can program anything useful with it? :)" [2]
- date of the package [2]
- 9 June 1993
- bytes in the compiler [2]
- 240
- bytes in the first version worked out
- 296
- bytes in FALSE's compiler [5]
- 1,024
When exactly?
The oldest files in the package, two of the example programs, are dated 21 May 1993, and the package itself 9 June 1993 [2]. So the language existed in May 1993 at the latest, and the first version came out before 9 June. Wikipedia's summary box gives "September 1993" as the first appearance [7]. The archive does not support that date.
Later sizes
Müller says in his talk that the compiler was "later reduced to 200" bytes [1], and Brian Raiter's page says he got it under 200 [9]. We did not find such a version to check.
The name
The name came last, when the compiler was done. Müller says he was trying, and failing, to express uselessness and confusion, and that it "turned out to be a better name than I had originally intended" [1]. He wrote it in lower case throughout the README [2], and that is still the convention, though the name is now often written with a capital [10]. Because of the swear word, many texts write it another way: see the questions page.
Ancestors
P′′, 1964
Twenty-nine years earlier the Italian computer scientist Corrado Böhm had described a language he called P′′ ("P double prime"), to study a family of Turing machines [3]. It has a tape of cells, one command that moves right, one that adds one to a cell and moves left, and a pair of brackets that repeat a piece of program while the current cell is not zero. Böhm showed that these are enough to compute anything that can be computed [3].
Brainfuck without its input and output commands is almost the same thing. The Esolang wiki calls brainfuck "a minor variation" of P′′ and notes that Böhm's paper already used six symbols that match + - < > [ ] [10]. Frans Faase, who keeps a set of pages about the language, also points out that the result was known in 1964 [11].
Did Müller know P′′? The Esolang wiki says it is not known [10]. In his own account he does not mention it: he describes getting there by cutting down FALSE [1]. That is all we can say.
The Turing machine, 1936
Both languages descend from the machine that Alan Turing described in 1936 to define what "computing" means: a tape, a head that reads and writes one square, and a table of rules [12]. Brainfuck's tape and pointer are that tape and that head. The page on theory explains the connection.
Strange languages before 1993
Languages made as a joke or an experiment were not new. The earliest known one made deliberately so is INTERCAL, designed in 1972 by Donald Woods and James Lyon [13]. But 1993 was a remarkable year: FALSE, brainfuck and Befunge all appeared. Befunge, by Chris Pressey, lays its program out on a grid and was made to be as hard to compile as possible [14], the opposite of Müller's aim.
How it spread
The language left the Amiga within a few years. A program that reads eight symbols is quick to write on any machine, and the package held an interpreter in portable C that anyone could compile [2]. What follows is what we can date.
- Small implementations. In 1999 Brian Raiter published a compiler for Linux of 166 bytes [15] [9], and the Hugi size-coding competition asked for the smallest interpreter; the winning program for DOS had 98 bytes [16] [17].
- Personal pages. Raiter, Frans Faase and Daniel Cristofani each kept pages with descriptions, programs and proofs [9] [11] [18]. Cristofani's became brainfuck.org.
- An archive. Jeff Johnston collected programs and tools in the Brainfuck Archive, later kept by Panu Kalliokoski; most of its files date from 2002 to 2005 [19].
- A community. A chat channel for esoteric languages has existed since December 2002 [20]. The Esolang wiki became the place where conventions and results are written down [10].
- Ambitious programs. In 2003 came Erik Bosman's Mandelbrot viewer [21], a compiler from BASIC [22] and a paper on a very short interpreter written in brainfuck itself [23]. In 2005 Jon Ripley published a text adventure of two megabytes [24].
- Outside notice. In 2005 a paper on the aesthetics of code called brainfuck "an archetypically minimalist language" [25]. In 2022 a book on unusual languages gave it a chapter [8]. In 2024 a research group used a variant of it to study how self-copying programs can arise from random ones [26].
Why this one?
The Esolang wiki says that the most popular esoteric languages are "probably Brainfuck and Befunge", and that many newer ones are heavily influenced by the two [13]. Its author found 700,000 pages on Google that mention it in 2017 and was surprised: he had "semi-expected" that people would write compilers and interpreters, "because it's very easy", but not the rest [1]. Nobody has measured why. These reasons seem likely to us; they are an interpretation, not a finding.
- You can hold all of it in your head. Eight commands, one table. You know the language after five minutes.
- You can implement it in an evening. The original interpreter is about a thousand characters of C [2]. So it became a standard first exercise, and a standard test for comparing languages [27] and for teaching how interpreters and compilers work [28].
- It is a real language. Anything computable can be written in it (see Theory). That turns every program into a puzzle with a guaranteed solution.
- The name is hard to forget.
- It is easy to vary. Change the symbols or add a command and you have a new language. Many people did (see Relatives).
Timeline
Dated events in the story of brainfuck, each with its source:
- The Turing machineAlan Turing defines computing with a tape and a head [12].
- P′′Corrado Böhm describes a language of four instructions on a tape and shows it can compute anything computable [3].
- INTERCALThe earliest known deliberately esoteric language [13].
- "Turing tar-pit"Alan Perlis warns of systems "in which everything is possible but nothing of interest is easy" [29].
- AminetUrban Müller founds the archive of Amiga software [4].
- FALSEWouter van Oortmerssen's language with a compiler of 1,024 bytes [5].
- brainfuckExample programs dated 21 May; the second version of the package, with a compiler of 240 bytes, dated 9 June [2].
- BefungeChris Pressey's language on a grid [14].
- Smaller and smallerA Linux compiler of 166 bytes [15]; a DOS interpreter of 98 bytes [16].
- Ook!David Morgan-Mar's version in the words of an orang-utan, an early renaming of the commands [30].
- A meeting placeThe chat channel for esoteric languages starts on 9 December [20].
- Mandelbrot, BFBASIC, a self-interpreter on arXivErik Bosman's fractal viewer (June) [21]; Jeffry Johnston's compiler from BASIC (March) [22]; Mazonka and Cristofani's paper (November) [23].
- Lost KingdomJon Ripley's text adventure, 2.08 megabytes of brainfuck [24].
- "A Box, Darkly"Mateas and Montfort write about brainfuck as minimalism [25].
- Optimisation written upMats Linander measures the standard techniques one by one [31].
- The author looks backMüller's talk at Tamedia TX [1].
- Hello, World! in 72KSab finds the shortest known program by exhaustive search [32].
- Computational LifeA variant of brainfuck as the world of an experiment on self-copying programs [26].
Three languages appeared in 1993: FALSE, brainfuck and Befunge.
What we could not verify
- The first version. We know it existed and that its compiler was 56 bytes larger, from the README of the second [2]. We did not find the file or its date.
- The day the language was made. The oldest dated file is from 21 May 1993. Anything more exact is a guess.
- "September 1993". Wikipedia's date for the first appearance [7] is later than the package on Aminet. We could not find where it comes from.
- A compiler under 200 bytes. Stated by Müller and by Raiter [1] [9]; we did not find the program.
- Whether Müller knew Böhm's P′′. Unknown [10]. His own account does not mention it [1].
- The talk itself. We read a community transcript, which says its last page is missing [1]. We did not watch the recording.
- Böhm's paper of 1964. We rely on descriptions of it [3] [10] and did not read the paper.
- Why it became the best known. The reasons given under “Why this one?” are our interpretation.
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.
- 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.
- 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. - Wikipedia, "P′′": the Wikipedia article on P′′. Our source for Corrado Böhm, "On a family of Turing machines and the related programming language", ICC Bulletin 3 (1964), 185 to 194, and for C. Böhm and G. Jacopini, "Flow Diagrams, Turing Machines and Languages with Only Two Formation Rules", Communications of the ACM 9(5) (1966), 366 to 371. We did not open the two papers themselves. Opened 11 October 2026.
- Esolang wiki, "Urban Müller": the wiki page on the author. Opened 11 October 2026.
- Wouter van Oortmerssen, "The FALSE Programming Language": the author's page on FALSE. Opened 11 October 2026.
- Esolang wiki, "FALSE": the wiki article on FALSE. Opened 11 October 2026.
- Wikipedia, "Brainfuck": the Wikipedia article. Used for orientation and for its list of references, not as evidence. Opened 11 October 2026.
- Ronald T. Kneusel, Strange Code, No Starch Press, 2022, chapter 10, read as the publisher's sample: chapter 10 on nostarch.com (PDF). Opened 11 October 2026.
- Brian Raiter, "Brainfuck: An Eight-Instruction Turing-Complete Programming Language": the brainfuck page on muppetlabs.com. Opened 11 October 2026.
- 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.
- Frans Faase, "Brainf***": the brainfuck pages on iwriteiam.nl. Opened 11 October 2026.
- Wikipedia, "Halting problem": the Wikipedia article on the halting problem. Our source for the statement of Turing's result (A. M. Turing, "On Computable Numbers, with an Application to the Entscheidungsproblem", Proceedings of the London Mathematical Society, 1936 to 1937), which we did not open. Opened 11 October 2026.
- Esolang wiki, "Esoteric programming language": the wiki article on esoteric languages. Opened 11 October 2026.
- Esolang wiki, "Befunge": the wiki article on Befunge. Opened 11 October 2026.
- Brian Raiter, bf.asm, copyright 1999: the assembly source on muppetlabs.com. Opened 11 October 2026.
- Hugi Size Coding Competition, list of past competitions: the competition archive on hugi.scene.org. Competition 6 (1999) asked for a brainfuck interpreter. Opened 11 October 2026.
- Esolang wiki, "Brainfuck implementations": the wiki's list of implementations. Opened 11 October 2026.
- Daniel B Cristofani, brainfuck.org: the main page. The page licenses his programs under Creative Commons Attribution-ShareAlike 4.0. Opened 11 October 2026.
- The Brainfuck Archive, maintained by Panu Kalliokoski, first collected by Jeff Johnston: the archive at esoteric.sange.fi and its
README.txt. Opened 11 October 2026. - Esolang wiki, "Community portal": the wiki's community portal. Opened 11 October 2026.
- 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. - Esolang wiki, "BFBASIC": the wiki article on BFBASIC. Opened 11 October 2026.
- 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.
- Jon Ripley, "The Lost Kingdom Brainfuck Edition", 2004 to 2005: the game's page on jonripley.com. Opened 11 October 2026.
- Michael Mateas and Nick Montfort, "A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics", Proceedings of the 6th Digital Arts and Culture Conference, IT University of Copenhagen, 1 to 3 December 2005, pages 144 to 153: the paper on nickm.com (PDF). Opened 11 October 2026.
- 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.
- kostya, benchmarks: kostya/benchmarks on GitHub. Opened 11 October 2026.
- Eli Bendersky, "Adventures in JIT compilation: Part 1, an interpreter", 20 March 2017: part 1 on eli.thegreenplace.net. Opened 11 October 2026.
- Alan J. Perlis, "Epigrams on Programming", ACM SIGPLAN Notices 17(9), September 1982, read in the copy at Yale: the epigrams at cs.yale.edu. Opened 11 October 2026.
- Esolang wiki, "Ook!": the wiki article on Ook!. Opened 11 October 2026.
- Mats Linander, "brainfuck optimization strategies", 7 January 2015: the article on calmerthanyouare.org. Opened 11 October 2026.
- 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.