%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

Text ⇄ Binary ⇄ Hex ⇄ Decimal Bytes (UTF-8)

Results update as you type.

Your numbers

Understanding the text to binary, hex and decimal bytes converter — concept and principle

Computers store text as numbers. This converter shows exactly which bytes a piece of text becomes when encoded in UTF-8, the encoding used by most web pages, and writes those bytes three ways: hexadecimal, binary and decimal. It is useful for learning how encoding works, debugging garbled characters, checking byte limits in databases or protocols, and teaching number bases.

Text Hi! as decimal, hex and binary bytesH, i and ! are code points 72, 105 and 33, hex 48 69 21, binary 01001000 01101001 00100001.Each letter is a number, stored as 8 bits1286432168421chardechexH724801001000i1056901101001!332100100001H: 64 + 8 = 72 → 0100 10003 bytes: 48 69 21ASCII letters take 1 byte each in UTF-8
“Hi!” is three bytes: 72 105 33 in decimal, 48 69 21 in hex.

How it is calculated

  1. Encode the text as UTF-8, giving a list of bytes, each a number from 0 to 255.
  2. Hex: write each byte in base 16 with two digits (00–FF).
  3. Binary: write each byte in base 2 with eight digits (00000000–11111111).
  4. Decimal: write each byte in base 10.
  5. Byte length: count the bytes, which can differ from the number of characters.

The principle

Unicode gives every character a number called a code point, such as U+0048 for H and U+C138 for 세. UTF-8 stores code points with a variable number of bytes: U+0000–U+007F (ASCII) use 1 byte, up to U+07FF use 2 bytes, up to U+FFFF (which includes all Hangul syllables) use 3 bytes, and the rest, such as most emoji, use 4 bytes. ASCII text is therefore identical in UTF-8, which is the main reason UTF-8 became the web's standard. Hex is popular for showing bytes because one hex digit is exactly four bits, so two digits always describe one byte.

Worked example

  1. Input: "Hi!".
  2. H is code point 72, i is 105, ! is 33; all are ASCII, so each is one UTF-8 byte.
  3. Hex: 72 = 4 × 16 + 8 = 48, 105 = 6 × 16 + 9 = 69, 33 = 2 × 16 + 1 = 21, giving 48 69 21.
  4. Binary: 72 = 64 + 8 = 01001000, 105 = 64 + 32 + 8 + 1 = 01101001, 33 = 32 + 1 = 00100001, giving 01001000 01101001 00100001.
  5. Decimal: 72 105 33; byte length 3.

How to read the result

For plain English text the byte length equals the number of characters. Each Korean syllable adds three bytes, so "세계" is 6 bytes, and an emoji such as a smiley face is 4 bytes. In UTF-8 a byte starting with 0 is a single ASCII character, a byte starting with 10 is a continuation byte, and a lead byte starting with 110, 1110 or 11110 announces a 2-, 3- or 4-byte character. This makes it easy to spot where a multi-byte character begins in a hex dump.

Common mistakes

Keep in mind: Other encodings such as UTF-16 or the legacy Korean EUC-KR produce different bytes for the same text. These results apply to UTF-8 only.

Frequently asked questions

Why does a Korean character take 3 bytes?

Hangul syllables lie between U+AC00 and U+D7A3, above U+07FF, so UTF-8 needs three bytes to store them.

What is the byte for a space?

A space is decimal 32, hex 20, binary 00100000.

How many characters fit in a 255-byte field?

255 ASCII characters, but only 85 Korean syllables in UTF-8.

Sources: IETF RFC 3629, UTF-8, a transformation format of ISO 10646 · The Unicode Consortium, The Unicode Standard (Chapter 3, Conformance)

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →