Text Tools

Binary, Hex and Text: How Characters Become Bytes (and Back)

By Smart Tools Utility Team · Published October 7, 2026 · Updated October 7, 2026 · 7 min read

Computers store text as numbers, and those numbers are written down as bytes. Binary and hexadecimal (hex) are two ways of showing the same bytes: binary spells out every bit, hex is the compact version programmers prefer. Our Binary / Hex to Text Converter turns text into either form and back. This guide explains what the output means, using results we got from the tool, so you can tell a correct conversion from a mangled one and fix the usual errors.

Characters, bytes and the two notations

A byte is a number from 0 to 255. Eight binary digits (bits) can represent exactly that range, and so can two hex digits. So every byte has two equivalent spellings:

Letter  Number  Binary     Hex
A       65      01000001   41
a       97      01100001   61
0       48      00110000   30

Note that the digit "0" is not the number zero: as text, it is the character with code 48. The tool's output confirms this: converting the text 0 gives 00110000 in binary and 30 in hex.

Hex digits run 0-9 then a-f, where a is 10 and f is 15. Each hex digit stands for exactly four bits, which is why a byte is always two hex digits: 0100 0001 is 4 and 1, so 41.

How to use the converter, step by step

  1. Choose the direction: Text → Binary/Hex or Binary/Hex → Text.
  2. Choose the format: Binary or Hex.
  3. Type or paste into the input box, which is labelled Plain text, Binary input or Hex input depending on your choice. The result appears in the output box a moment after you stop typing; there is no convert button.
  4. Use Copy to copy the output. Swap Direction flips the direction and moves the current output into the input, so you can check a result by converting it back.
The Binary / Hex to Text Converter with the text Hello, é € entered and the binary output shown in groups of eight digits
Text to binary. Each group of eight digits is one byte; the é and the € use more than one byte each.

Output is always separated by single spaces: one group of eight digits (or two hex digits, in lowercase) per byte. For Hello the tool gives 01001000 01100101 01101100 01101100 01101111 in binary and 48 65 6c 6c 6f in hex.

Why some characters need more than one byte

Plain English letters, digits and punctuation take one byte. Everything else takes two to four, because the tool uses UTF-8, the encoding the web uses. We converted a few characters to see:

Text   Bytes (hex)     Count
A      41                1
é      c3 a9             2
€      e2 82 ac          3
日本   e6 97 a5 e6 9c ac 6  (3 per character)
😀     f0 9f 98 80       4

This is why "the length of a string" and "the number of bytes" can differ, and why a binary string for "Hello" is five groups while "Hello, é €" is thirteen. It also explains the most common conversion mistake, covered below: reading UTF-8 bytes as if each byte were a character.

If you need to convert the other way, this is the same logic: the tool collects bytes, then decodes them as UTF-8. In our test, c3 a9 decoded to é, e2 82 ac to € and f0 9f 98 80 to the emoji.

Want to try a conversion yourself?

Open the Binary / Hex to Text Converter

Converting binary or hex back to text

Paste the digits in any of these forms. All of them gave Hello in our tests:

48 65 6c 6c 6f           (spaces)
48656C6C6F               (no spaces, any letter case)
0x48656c6c6f             (one leading 0x)
01001000 01100101 ...    (binary, spaces or line breaks)
0100100001100101...      (binary, run together)

The tool removes all whitespace, strips a single leading 0x, regroups the digits into bytes and decodes them. That is why it does not care how you spaced them. Binary with line breaks between bytes also works.

The converter in Binary/Hex to Text mode with hex input 48 65 6c 6c 6f 2c 20 c3 a9 20 e2 82 ac and the decoded text Hello, é € in the output
Hex back to text. The two-byte and three-byte sequences come back as é and €.

Errors and what they mean

Four messages cover most failures:

The converter showing the hex input 48 65 6c 6c 6 and the red error message that hex must have an even number of digits
An odd number of hex digits cannot form whole bytes, so the output stays empty and a message explains why.

When the output looks like garbage

Sometimes no error appears, yet the text is wrong. In these cases the digits are valid, but they are not UTF-8 text:

Where you will actually use this

Related encodings solve different problems: Base64 packs bytes into text more compactly than hex does, and URL encoding writes unsafe characters as percent-hex pairs such as %C3%A9.

Limits and privacy

Quick answers

Why does one letter give eight digits in binary? Because a byte is eight bits, and the tool always pads each byte to eight digits.

Can I convert a number such as 255 to binary here? Not as a number. Typing 255 as text converts the characters "2", "5", "5" (00110010 00110101 00110101), not the value 255.

Is hex case-sensitive? No. 48656C6C6F and 48656c6c6f give the same text.

Want to try a conversion yourself?

Open the Binary / Hex to Text Converter