Karthik Divi
·2 min read

BrainF**k Online Compiler

BrainF**k is an esoteric programming language created by Urban Muller in 1993. It has exactly 8 commands: > < + - . , [ ]. That's the entire language. Despite this absurd minimalism, it's Turing complete -- meaning it can compute anything that any other programming language can compute. It just makes you work extremely hard for it.

Nobody writes production software in BrainF**k. That's not the point. The language exists as a thought experiment and a challenge. It forces you to think about what computation really is at its most basic level: a tape of memory cells, a pointer, and simple operations.

The 8 commands

CommandWhat it does
>Move pointer right
<Move pointer left
+Increment current cell
-Decrement current cell
.Output current cell as ASCII
,Read input into current cell
[Jump past matching ] if cell is 0
]Jump back to matching [ if cell is not 0

Hello World

Even "Hello, World!" requires real effort in BrainF**k:

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]
>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

This works by using nested loops to build up ASCII values in memory cells. The first part (++++++++[>++++[...) sets up cells with values near the ASCII codes for each character. The second part navigates between cells and outputs them with ., making small adjustments with + and - as needed.

If that looks unreadable, that's because it is. Writing BrainF**k is a puzzle. Debugging it is a bigger puzzle. But figuring out how to produce the right output with just 8 operations is genuinely educational -- it builds intuition about how low-level computation works.

Running BrainF**k on OneCompiler

OneCompiler interprets BrainFk and shows you the output. Since the language is so minimal, there's nothing to install or configure -- just paste your program and run. It's a great way to work through BrainFk challenges or verify that your program produces the right output.

Try it: BrainF**k Online Compiler on OneCompiler