Brainfuck Interpreter
Run programs in Brainfuck, the famous minimalist esoteric programming language — a Turing-complete language with just eight commands (> < + - . , [ ]) that manipulates a tape of byte cells. Enter a program (any characters other than those eight are treated as comments and ignored), supply any input the program reads with ,, and run it to see the output, the output as hex bytes, the number of steps executed, and a final tape dump. The interpreter uses an 8-bit wrapping tape (values 0–255), reads input until end-of-input (returning 0 at EOF), and bounds-checks the pointer so it cannot fall off the tape. A step limit guards against infinite loops. Everything runs locally in your browser.
Output
Details
The math. Brainfuck models a single-tape Turing machine. The tape is an array of byte cells (here 8-bit, 0–255, wrapping), all initially zero; a data pointer starts at cell 0. The eight commands operate as: > move the pointer right, < move left, + increment the cell, - decrement the cell (wrapping mod 256), . output the cell as a byte, , read one byte from the input into the cell (0 at end-of-input), [ jump forward to the matching ] if the cell is zero, and ] jump back to the matching [ if the cell is non-zero. The interpreter pre-computes the bracket pairs so jumps are instant, counts every executed command as one step, and stops with an error if a bracket is unmatched, the pointer leaves the tape, or the step limit is reached (protecting the page from infinite loops). Because every non-command character is a comment, programs can be annotated freely. Everything runs locally — nothing leaves your browser.