Binary Encoder / Decoder

Convert text to a binary bit string, or decode binary back to text — with byte delimiters and an optional 0b prefix. Decoding ignores spacing and prefixes, so any format round-trips. Runs entirely in your browser, no server, no sign-up.

Result

What this tool does

Convert any text to a binary bit string, or decode a binary string back to the original text — instantly, right in your browser. Every byte becomes eight 0/1 bits. Nothing is sent to a server: it runs locally, works offline, and needs no sign-up. Pick a Mode, then optionally choose a byte delimiter or a per-byte 0b prefix.

Modes

ModeWhat it does
encode (default)Turns your text into binary — e.g. Hi becomes 01001000 01101001 (each byte is eight bits).
decodeReverses it — turns a binary string back into the original text. Decoding ignores whitespace, delimiters, and the 0b prefix.

Formatting options (encode)

OptionWhat it doesExample
Byte delimiterInserts a separator between bytes — space (default), none, colon, dash, comma, or newline.Hi · colon → 01001000:01101001
Per-byte prefixAdds 0b before each byte.Hi · 0b + space → 0b01001000 0b01101001

Decode output — text or raw bytes

FormatWhen decoding
text (default)Renders the bytes as UTF-8 text (errors if they aren't valid UTF-8)
bytesShows the decoded bytes as a plain lowercase hex byte string — use this for binary data that isn't readable text

Examples

InputSettingsOutput
Hiencode01001000 01101001
Helloencode · no delimiter0100100001100101011011000110110001101111
Hiencode · 0b prefix · space0b01001000 0b01101001
01001000 01101001decodeHi
01001000:01100101:01101100decodeHel

FAQ

Is it free and private?

Yes — your input never leaves your device, and it keeps working offline once the page has loaded.

What encoding does it use for text?

Text is read and written as UTF-8, so each character becomes its one-or-more UTF-8 bytes, and each byte becomes eight bits. An emoji or accented letter therefore spans several bytes (é11000011 10101001).

Can I paste binary with spaces or 0b prefixes?

Yes. Decoding ignores ASCII whitespace, the : - , delimiters, and the 0b prefix, so a string copied from a hex dump, a debugger, or Python's bin() output decodes without editing.

Does the bit count matter?

Yes — after stripping formatting, the number of 0/1 bits must be a multiple of 8 (one byte per eight bits). A partial byte is an error.

My decoded output looks garbled.

The bytes probably aren't UTF-8 text. Switch the Decode output to bytes to see the raw hex instead.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool binary-codec "Hello, world!"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/binary-codec/?input=Hello%2C%20world%21&mode=encode&format=text&delimiter=space&prefix=none

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.