Skip to main content

Convert Text to Binary, Hex, Octal & Decimal Codes

Convert text to binary, hexadecimal, octal, and decimal character codes.

Loading tool…

Your file stays in this browser. Nothing is uploaded.

How Binary Code Converter works

Browser Toolset Binary Code Converter turns the text you type into binary, hexadecimal, octal and decimal character codes in your browser. It reads each character as a UTF-16 code unit, so ASCII characters give 8-bit bytes; the conversion is one-way and does not decode binary back into text.

How to use this tool

  1. Type or paste plain text into the Input Text field.
  2. Read the 8-bit binary, hexadecimal, decimal and octal results, which update instantly.
  3. Check that your text is plain ASCII if you need strict 8-bit bytes for every character.
  4. Click "Copy" next to any row to copy that representation.

Common uses

  • Computer science students learning how characters map to binary, hex and octal values.
  • Software engineers checking character codes for low-level protocols and byte buffers.
  • Teachers preparing binary-code worksheets and classroom puzzles.
  • Puzzle designers creating binary messages for CTF challenges and escape rooms.

Frequently asked questions

How does text to binary conversion work?

Each character is mapped to its character code (its UTF-16 code unit, which equals the ASCII code for plain English text), which is then written in binary padded to at least 8 digits.

Can I convert emojis or non-English characters?

You can enter them, but the output is not UTF-8 bytes. Characters above code 255 produce binary values wider than 8 bits, and emoji appear as two UTF-16 surrogate code units. For standard UTF-8 byte output, use a UTF-8 aware tool.

Are my input strings transmitted to a backend?

No. Characters are converted by JavaScript running in your browser, and the text you type is not uploaded to a server. The page does not store the input, so copy the codes you need before closing the tab.

How is "Hello" represented in binary?

In 8-bit binary, Hello is 01001000 01100101 01101100 01101100 01101111. The tool also shows hexadecimal 48 65 6C 6C 6F, octal 110 145 154 154 157 and decimal 72 101 108 108 111 for the same letters.

Can I convert binary code back into text?

No. The tool only converts text into codes. It has no binary-to-text mode and no options for delimiters or a 0b prefix, so decode binary elsewhere or look up each 8-bit group in an ASCII table.

Details and limits

At the most fundamental hardware level, all digital computers operate exclusively on binary electrical states: high and low, 1 and 0. Our Binary Code Converter shows how the text you type maps to binary, hexadecimal, octal and decimal character codes. It is a one-way, text-to-code tool based on UTF-16 code units.

What the four outputs are

Type or paste into the Input Text box and four rows update at once: 8-Bit Binary, Hexadecimal, Decimal ASCII Codes and Octal. Everything is computed in your browser by reading each character's numeric code, and nothing is sent anywhere. The conversion goes one way, from text to numbers. There is no mode that turns binary, hex or decimal back into text.

Each character becomes one group, with single spaces between groups. Binary is padded with zeros to at least 8 digits, hexadecimal is written in capital letters padded to 2 digits, octal is padded to 3 and decimal is not padded. The letter A is 01000001, 41, 101 and 65, and a space is 00100000, 20, 040 and 32.

Features and limits

  • The numbers are UTF-16 code units. For plain English letters, digits and common punctuation these equal the ASCII codes 0 to 127. A character such as é (233) still fits in 8 binary digits, but the value is the Unicode number, not necessarily the byte a UTF-8 file would hold.
  • Characters above 255 give wider groups. The euro sign (8364) becomes 10000010101100, which is 14 digits, so the 8-Bit label really applies only up to 255. Hex and octal groups grow past 2 and 3 digits in the same way.
  • An emoji is stored as two code units, called a surrogate pair, so it produces two groups.
  • The input is a single-line field, so you cannot enter a line break. Convert each line on its own.
  • Each row has its own Copy button, and it copies the full value even when the row is too narrow to show all of it. There are no options for a separator, a 0b or 0x prefix, or grouping into bytes.

Reading and checking the output

Some patterns make hand-checking easy. A capital letter and its lowercase partner differ by 32 (A is 65, a is 97), the digits 0 to 9 start at 48, and a space is 32. In binary the two case versions differ in exactly one bit.

If you need true UTF-8 bytes for non-English text or emoji, this tool is not the right source, because its numbers are code units rather than encoded bytes. Use a UTF-8 aware tool for that.

To turn text into a transport-safe format use Base64 Studio (Text & Files), and for dots and dashes use the Morse Code Converter. The Roman Numeral Converter handles numbers rather than text.