FBZ Encoder/Decoder

FBZ stands for "foo-bar-baz" encoding. Inspired my common computer programming template variables, FBZ takes a normal string and converts it into a mess of six keywords: foo, fo, bar, br, baz, and bz. Try entering some normal text below and encoding it, or try decoding some FBZ-encoded text!

Encode Decode

Output:


Click to copy the output to the clipboard.

How does it work?

Well, FBZ uses a binary conversion-replacement algorithm; the process is actually quite simple. First, the text is reversed (Hello world would become dlrow olleH. Then, each character in the text is converted into base-2 binary without the preceding 0 (dlrow olleH becomes 1100100 1101100 1110010 1101111 1110111 0100000 1101111 1101100 1101100 1100101 1001000). After that, all the numbers in the binary string are converted to the following keywords, in order: 00 to fo, 01 to foo, 10 to br, 11 to bar, 0 to bz, and 1 to baz. This ensures that we can translate every single number in the binary string with no leftovers.

And there you have it! The text is now encoded with FBZ. To decode, a practically inverse algorithm is applied to the encoded string.