Skip to main content
Preparing workspace

Text to Binary / Binary to Text

Hi = 01001000 01101001. Convert text to binary (UTF-8) and binary to text, plus decimal, hex and octal to binary, with a binary alphabet table.

Still loading. If the tool doesn’t appear, reload this page.

About this tool

Text to Binary / Binary to Text

Convert text to binary and back (UTF-8), and decimal, hex or octal numbers to binary, with a binary alphabet table.

Text to binary writes each character as 8-bit UTF-8 bytes: H = 01001000 and i = 01101001, so “Hi” = 01001000 01101001, while é takes two bytes. Whole numbers convert by powers of two, so 255 = 11111111 and 10 = 1010. Paste text, binary, decimal, hex or octal and convert either way.

How to use Text to Binary / Binary to Text

  1. Pick Text → Binary or Binary → Text and type or paste into the left box; the right box updates as you type.

  2. Choose space, no or comma separators, then Copy or Download the result. Swap sends the result back the other way.

  3. To convert a number, type it into the Decimal, Binary, Hexadecimal or Octal box; the other three update at once.

Why use Text to Binary / Binary to Text

  • One page, every binary job

    Text ⇄ binary and decimal / hex / octal ⇄ binary, so you don't need a second tool.

  • Real UTF-8

    Accented letters, other scripts and emoji are encoded as UTF-8 bytes, the same as Python, JavaScript and every web page.

  • Forgiving input

    Binary with spaces, commas, line breaks or no separator at all; numbers with 0b, 0x or 0o prefixes, up to 4,096 digits long. A UTF-8 byte order mark (EF BB BF) in pasted binary is kept, not dropped.

  • Binary alphabet built in

    A–Z, a–z, 0–9 and space in 8-bit binary, for quick lookups.

Common use cases

  • Inspect each Unicode code point and its UTF-8 bytes. A is 41 in hexadecimal, while é is C3 A9. An invalid byte sequence identifies the byte to check.
  • Checking a computer-science exercise on ASCII, bits and bytes, or on converting decimal to binary by hand.
  • Decoding a string of ones and zeros from a puzzle, a CTF challenge, a T-shirt or a forum post.
  • Converting a hex colour, a byte value or a bit mask between hex, decimal and binary while programming.

Frequently asked questions

How do I convert text to binary?

Take each character's code and write it as an 8-bit binary number. H is 72 = 01001000 and i is 105 = 01101001, so “Hi” is 01001000 01101001. Characters outside basic ASCII use two to four bytes in UTF-8: é is 11000011 10101001.

Link to answer
How do I convert decimal to binary?

Divide by 2 repeatedly and write the remainders from last to first. 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1, so 13 = 1101. To go back, add the powers of two where there is a 1: 8 + 4 + 1 = 13.

Link to answer
How do I convert binary to text?

Split the bits into groups of 8, turn each group into its number, and look up the character. 01001000 = 72 = H. Paste the bits into the Binary → Text box and it decodes them, with or without spaces between bytes.

Link to answer
What is the letter A in binary?

Capital A is 01000001 (65) and lowercase a is 01100001 (97). Upper and lowercase letters differ only in the third bit from the left, which is why the binary alphabet table lines them up side by side.

Link to answer
How do I convert hex to binary?

Replace each hex digit with its 4-bit binary value: F = 1111, A = 1010, 3 = 0011. So 0xFF = 1111 1111 = 255 and 0x3A = 0011 1010 = 58. Type the hex value into the Hexadecimal box to see all four bases.

Link to answer
Why are there 8 bits in a byte?

A byte holds values from 0 to 255 (2^8 = 256 possibilities), enough for every ASCII character with room to spare. That is why text-to-binary output is grouped in eights.

Link to answer

Embed this tool on your site

Add the Text to Binary / Binary to Text widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.

<iframe src="https://www.altftool.com/embed/widget/text-to-binary"
  title="Text to Binary / Binary to Text — free AltFTool widget"
  width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
  loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/text-to-binary?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>

Browse all embeddable widgets →