DevBolt
Processed in your browser. Your data never leaves your device.

How do I convert text to binary or binary to text online?

Enter text to instantly see it converted to binary (8-bit per character), hexadecimal, octal, or decimal representation. Paste binary or hex to decode it back to text. The tool handles full UTF-8 Unicode including emoji. Everything runs in your browser.

Text to binary
Input
Hello
Output
01001000 01100101 01101100
01101100 01101111
← Back to tools

Text ↔ Binary Converter

Convert text to binary, hexadecimal, octal, or decimal — and back. Supports full Unicode via UTF-8 encoding.

Result will appear here…
Quick Reference — Text Encoding
How it works: Each character is first encoded to bytes using UTF-8, then each byte is represented in the selected number base (binary, hex, octal, or decimal).
Binary (Base 2): Uses digits 0 and 1. Each byte is 8 bits (e.g., "A" = 01000001). Fundamental to how computers store data.
Hexadecimal (Base 16): Uses 0-9 and a-f. Each byte is 2 hex digits (e.g., "A" = 41). Common in color codes, memory addresses, and debugging.
Octal (Base 8): Uses digits 0-7. Each byte is up to 3 octal digits (e.g., "A" = 101). Used in Unix file permissions.
Decimal (Base 10): Standard numbers 0-255 for each byte (e.g., "A" = 65). Same as ASCII values for the basic Latin alphabet.
Unicode support: Non-ASCII characters (emoji, CJK, etc.) produce multiple UTF-8 bytes. For example, "hello" in Chinese (你好) produces 6 bytes.

Tips & Best Practices

Pro Tip

ASCII uses only 7 bits — the 8th bit enabled character sets

Original ASCII maps 128 characters to 7-bit values (0-127). The 8th bit was unused, leading to dozens of incompatible extensions (Latin-1, Windows-1252, etc.) that each mapped 128-255 differently. UTF-8 solved this by using variable-length encoding: 1 byte for ASCII, 2-4 bytes for everything else. Always use UTF-8.

Common Pitfall

Emoji and CJK characters are 3-4 bytes in UTF-8

The string '😀' is 1 character but 4 bytes in UTF-8. 'Hello 😀' is 7 characters but 10 bytes. Database VARCHAR(10) might reject it if measured in bytes. JavaScript's String.length counts UTF-16 code units: '😀'.length === 2. Use Array.from('😀').length for true character count.

Real-World Example

Binary representation reveals bitwise operations visually

Seeing 5 (0101) AND 3 (0011) = 1 (0001) in binary makes bitwise operations intuitive. This is invaluable for understanding permission bitmasks (Unix chmod 755 = 111 101 101), IP subnet masks (255.255.255.0 = 24 ones followed by 8 zeros), and flag enums.

Security Note

Unicode homoglyphs enable phishing attacks

The Cyrillic 'а' (U+0430) looks identical to Latin 'a' (U+0061) but is a different byte sequence. Attackers use homoglyphs to create convincing phishing URLs (pаypal.com) and bypass text filters. Always validate domains using Punycode (xn-- prefix) and normalize Unicode input with NFC or NFKC before comparison.

Frequently Asked Questions

How do I convert text to binary representation?
Type or paste text and each character is instantly converted to its binary equivalent. For ASCII text, each character maps to an 8-bit binary number. The letter A is 01000001 (decimal 65). UTF-8 characters may require 1 to 4 bytes, producing longer binary sequences for non-ASCII characters. DevBolt handles full Unicode including emoji and CJK characters. This conversion is useful for understanding computer data storage, debugging encoding issues, and educational purposes.
What is the difference between ASCII and UTF-8 binary encoding?
ASCII uses fixed 7-bit encoding (stored as 8 bits) for 128 characters: English letters, digits, punctuation, and control characters. Every ASCII character is one byte. UTF-8 is variable-length and backward-compatible with ASCII. Characters beyond ASCII use 2-4 bytes: European accented characters use 2, CJK use 3, emoji use 4. UTF-8 is used by over 98% of websites. When converting text to binary, the encoding determines how many bits each character produces.
How do I decode binary back to readable text?
Split the binary string into 8-bit groups, convert each to its decimal value, then map to the corresponding character. 01001000 01101001 converts to decimal 72 and 105, producing 'Hi'. For UTF-8, some characters span multiple bytes. DevBolt handles both directions instantly. Paste binary digits separated by spaces or as a continuous string and the tool reconstructs the original text.

Related Convert Tools