Text to Binary and Hex Converter

Type text to see its bytes in binary, hexadecimal, octal or decimal. Switch direction to turn a list of byte values back into text.

Use the tool

Loading the tool…

About Text to Binary and Hex Converter

Convert text into numbers, or numbers back into text. Choose the number system: binary (base 2), hexadecimal (base 16) or octal (base 8).

Worked example

Enter `Hi` and choose hexadecimal. The tool shows the hexadecimal values for each letter.

Limits

The conversion follows the character encoding the tool uses. Check the result if your text uses characters outside basic English.

How to use Text to Binary and Hex Converter

  1. Choose the direction and the number system.
  2. Type or paste your text or your byte values.
  3. Read the result and use Copy the result.

Good to know

  • Text is converted as UTF-8. Plain English letters and digits are one byte each. A letter such as é is two bytes and an emoji is four.
  • When converting back, separate byte values with spaces, commas or new lines. Unbroken binary or hexadecimal runs are split into whole bytes.
  • Each byte must be from 0 to 255. Values that do not form valid UTF-8 text are rejected.
  • Hexadecimal can include a 0x prefix on each byte.

Frequently asked questions

Why does one character give several bytes?

UTF-8 uses one byte for basic English characters and two to four for other characters.

Can I convert a number into a different base?

This tool works with text. For converting a single number between bases, use a number base converter.

Is anything I type saved or sent?

No. The work happens in your browser on this page, and nothing is stored or sent to us.