Text to Binary / Hex Converter

See how text is stored as bytes: convert words into binary, hexadecimal, octal or decimal codes — or paste a string of 0s and 1s (or hex) and read the hidden message.

Runs entirely in your browser. Nothing you enter is uploaded or stored.

Direction
Format

How to convert text to binary

  1. Choose Text → codes and a format: binary, hexadecimal, octal or decimal.
  2. Type your text. Each byte is shown as one group — for binary, 8 digits per byte.
  3. To decode, choose Codes → text and paste the codes. Spaces, commas and line breaks between groups are optional for binary (groups of 8) and hex (pairs); a 0x prefix on hex values is fine.

Example: “Hi” is 01001000 01101001 in binary, 48 69 in hex and 72 105 in decimal.

How text becomes binary

Computers store text as numbers. Each character is first given a number (its code point) by the Unicode standard — “H” is 72, “é” is 233, “😀” is 128,512. That number is then encoded into bytes, almost always using UTF-8:

This converter always uses UTF-8, which is what the web, email and modern operating systems use, so the results match what you'd see in a hex editor or a network capture.

Number systems at a glance

FormatBaseDigitsOne byte“A”
Binary20–18 digits01000001
Octal80–7up to 3 digits101
Decimal100–9up to 3 digits65
Hexadecimal160–9, A–F2 digits41

To convert a single number between bases (for example 255 → FF → 11111111), use the number base converter.

Frequently asked questions

What is “hello” in binary?

01101000 01100101 01101100 01101100 01101111 — one 8-bit byte per letter.

Why does an accented letter or emoji produce several bytes?

UTF-8 uses 1 byte for basic English characters and 2–4 bytes for everything else. So “é” is two bytes and most emoji are four.

Why do I get “not valid UTF-8” when decoding?

The bytes don’t form valid UTF-8 text — usually because a digit is missing or extra, the groups are misaligned, or the data is not text at all (for example part of an image).

Is my text uploaded?

No. The conversion runs in your browser.