Skip to content

dev.esolang

run Brainfuck and Ook! programs, joke languages that CTF puzzles hide text in

Esoteric languages are joke programming languages. Puzzles and CTF challenges often hide a message inside one, and these functions run such a program and give back what it prints.

Tags: encoding

  • brainfuck run a Brainfuck program and return what it prints
  • ook run an Ook! program, Brainfuck written with the words Ook. Ook? and Ook!, and return what it prints
brainfuck(src: str, input?: str|bytes) -> str|bytes

run a Brainfuck program and return what it prints

The tape has 30000 cells of one byte each, which wrap from 255 to 0. , reads the next byte of input, or 0 once it runs out. Characters other than the eight commands are comments. The output is a string when it’s valid UTF-8, else bytes

1
brainfuck("++++++++[>++++++++<-]>+.+.")"AB"
2
brainfuck(",[.,]", "echo")"echo"
Example outputCtrl+Enter to run

See also ook

ook(src: str, input?: str|bytes) -> str|bytes

run an Ook! program, Brainfuck written with the words Ook. Ook? and Ook!, and return what it prints

1
ook("Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook?")"\u{2}"
Example outputCtrl+Enter to run

See also brainfuck

1
# print a letter
2
brainfuck("++++++++[>++++++++<-]>+.")"A"
3
# echo the input back
4
brainfuck(",[.,]", "hi")"hi"
Example outputCtrl+Enter to run

Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.