Brainfuck encoder
Turn text into a Brainfuck program that prints it, or run a Brainfuck program and see its output.
Brainfuck encoder
Paste any text and this tool writes a Brainfuck program that prints it back out exactly, one character at a time. It also works the other way: paste a Brainfuck program and the tool runs it, showing whatever it outputs. Switch between the two with the mode option, or use the swap button to send a generated program straight into the interpreter.
Turn on "Optimize length with loops" to make the generated program shorter: instead of repeating + up to 255 times for a single character, it builds the value with a small multiplication loop, which matters once the input runs past a few words. Cell size controls how each character is stored — 8-bit is the classic byte-per-cell Brainfuck, matching how real interpreters and UTF-8 text behave, while 16-bit and 32-bit cells hold a whole code point per cell so accented letters and emoji round-trip cleanly without extra bytes. Tape cells sets how many memory cells the interpreter has to work with, and the step limit stops a runaway loop from freezing the page — raise it for a program that legitimately needs more steps, or lower it while testing something you don't trust yet. "Show tape state after running" appends a snapshot of the memory cells once the program finishes, which is useful for debugging loops that don't produce the output you expected. Generated code can also be wrapped to a fixed line width for easier reading; Brainfuck itself ignores whitespace and any character that isn't one of its eight commands, so wrapping never changes what the program does.
Very long input produces a longer program, and both directions are capped so the browser tab never freezes on accidental runaway input or an infinite loop — you'll get a clear message about what to adjust instead of a hung page.
Everything runs locally in your browser; no text or code is ever uploaded anywhere. Copy the result, download it as a .txt file, clear the panel, or send the output back into the input to keep working.