Ttooleras
0️⃣

Text to Binary

Converters

Convert text to binary representation with ASCII or UTF-8 encoding and configurable output format (spaces, dashes, or continuous).. Free, private — all processing in your browser.

Advertisement

The Text to Binary tool converts any text — words, sentences, messages, identifiers — into its binary representation. Each character becomes an 8-bit byte (for ASCII) or a multi-byte sequence (for UTF-8 Unicode). Type \"Hello\" and get back 01001000 01100101 01101100 01101100 01101111 (the binary for H, e, l, l, o). Use it for educational purposes, puzzle construction, protocol-level debugging, or converting text for systems that process raw bits.

The tool handles both ASCII (7-bit, English-only) and UTF-8 (1-4 bytes per character, full Unicode) encoding. Output formatting is customizable: spaces between bytes (default, most readable), dashes, commas, or continuous without separators. Each byte is always 8 bits with leading zeros preserved for alignment. For multi-byte UTF-8 characters (emoji, accented letters, Asian scripts), the tool shows the full multi-byte sequence with optional character-level grouping markers. Reverse conversion (binary to text) is available via the companion Binary to Text tool. Everything runs client-side so even unusual text you don\\u2019t want anyone else to see stays in your browser.

Text to Binary — key features

ASCII and UTF-8

Encodes English-only text in compact ASCII or full Unicode via UTF-8 multi-byte sequences.

Configurable separators

Space, dash, comma, or no separator between bytes — pick what matches your downstream use.

Character grouping

Optional grouping markers show which bytes belong to which character (important for UTF-8 multi-byte).

Byte count display

Shows both character count and byte count so you know the encoding overhead.

Leading zeros preserved

Every byte is explicitly 8 bits with leading zeros for consistent formatting.

Reverse via companion tool

Round-trip via the Binary to Text tool for verification.

Bulk conversion

Handles short words to full documents without size limits.

Client-side only

No upload — text stays in your browser.

How to use the Text to Binary

  1. 1

    Enter text

    Paste any text into the input field — from a single word to a paragraph.

  2. 2

    Choose encoding

    ASCII for English-only text (fewer bytes per character), UTF-8 for Unicode with emoji and accented characters.

  3. 3

    Pick separator

    Space (default), dash, comma, or no separator between bytes.

  4. 4

    See binary output

    The binary form appears immediately, with character count and byte count displayed.

  5. 5

    Copy or share

    One-click copy the binary output to clipboard.

Common use cases for the Text to Binary

Education

  • Teaching binary encoding: Show students that text is stored as specific bit patterns, not magic.
  • Character encoding lessons: Demonstrate the difference between ASCII and UTF-8 by encoding the same text in both.
  • Homework solutions: Generate binary representations for exercises without manual calculation.

Puzzles and creative use

  • Puzzle construction: Encode messages as binary for escape rooms, alternate reality games, or geeky gifts.
  • Geek communication: Send messages in binary to a coder friend as a fun exchange.
  • CTF challenges: Prepare binary-encoded flags or hints for capture-the-flag security challenges.

Development

  • Protocol testing: Produce binary representations of text payloads to test systems that process raw bytes.
  • Debug encoding: Verify what bytes a particular string produces when UTF-8 encoded.
  • Test fixtures: Generate binary test data for parsers or encoders.

Text to Binary — examples

Simple word

A short English word in binary.

Input
Hi
Output
01001000 01101001

Space-separated sentence

Every character including spaces.

Input
Hello world
Output
01001000 01100101 01101100 01101100 01101111 00100000 01110111 01101111 01110010 01101100 01100100

Dash separator

Different visual separator.

Input
ABC
Output
01000001-01000010-01000011

UTF-8 accented

Multi-byte character for é.

Input
café
Output
01100011 01100001 01100110 11000011 10101001
(é takes 2 bytes in UTF-8)

Emoji

4-byte UTF-8 sequence.

Input
Hi 😀
Output
01001000 01101001 00100000 11110000 10011111 10011000 10000000
(😀 takes 4 bytes)

Technical details

Text-to-binary encoding process:

1. Convert text to a byte sequence using the chosen encoding:
- ASCII: each character\u2019s charCode is 0-127, directly one byte
- UTF-8: characters map to 1-4 byte sequences via standard algorithm
2. For each byte, format as 8-bit binary with leading zeros (\"A\" → 01000001, not 1000001)
3. Join bytes with the chosen separator (space by default)

JavaScript implementation: use TextEncoder for proper UTF-8: new TextEncoder().encode(text) returns Uint8Array of bytes. Then byte.toString(2).padStart(8, \"0\") gives zero-padded binary.

For ASCII-only: charCodeAt(i) works directly for characters with codes 0-127. For codes above 127 (accented, emoji), TextEncoder is required for correct UTF-8 multi-byte output.

Character count vs byte count: one character doesn\u2019t equal one byte in UTF-8. \"é\" is one character but two bytes (11000011 10101001). \"😀\" is one character (or one grapheme) but four bytes. The tool reports both counts.

Grouping: for human readability, the tool offers per-character grouping where each character\u2019s multi-byte sequence is grouped together (e.g., \"é = 11000011 10101001\"), in addition to per-byte separators.

Common text sizes:
- Short phrase (\"Hello world\"): ~88 bits, 11 bytes
- Sentence: ~80-160 bytes
- Paragraph (200 characters): ~1600 bits, 200 bytes
- Article: several KB of binary output

Performance: conversion is O(n) and extremely fast. Multi-megabyte text converts in milliseconds.

ASCII vs Unicode: for English text, ASCII and UTF-8 produce identical output (every character is one byte). For any non-English content, UTF-8 is required for correctness.

Common problems and solutions

ASCII mode fails on non-English

ASCII only works for characters 0-127 (basic English). Accented letters, emoji, or Asian characters fail or produce garbage in ASCII mode. Use UTF-8 for anything beyond plain English.

Leading zeros stripped

Some tools drop leading zeros: "A" becomes 1000001 instead of 01000001. This produces ambiguous 7-bit representation. The tool always pads to 8 bits for consistency.

Byte count surprising

Character count doesn’t match byte count in UTF-8. A 5-character Japanese word might be 15 bytes (3 bytes per character). The tool shows both counts.

Newlines and whitespace

Spaces, newlines, and tabs are real characters with real binary representations (space = 00100000, newline = 00001010, tab = 00001001). They appear in the output even when you think of them as "nothing".

Control characters

Non-printable characters (0x00-0x1F) have binary representations too. Including them in input may confuse downstream processing. Most text doesn’t have these, but machine-generated input might.

Big endian assumption

The tool outputs bytes in text order (left to right). Each byte’s bits are also left to right, most significant first. This matches the ASCII/UTF-8 convention and what humans expect to see.

No actual compression

Binary representation is 8x the size of the original text’s byte representation (each byte displayed as 8 characters). It’s for visualization, not storage efficiency.

Text to Binary — comparisons and alternatives

Compared to a Python one-liner (\"\".join(format(b, \"08b\") for b in text.encode())), this tool is faster for one-off conversions and visualizes the character-to-byte mapping clearly. For automation, use the language built-in.

Compared to other online text-to-binary tools, this one properly handles UTF-8 multi-byte characters (many assume ASCII only) and provides configurable output formatting.

Compared to command-line xxd or od utilities, this tool produces pure binary output (8 bits per byte) rather than hex. Use xxd for general hexdump; use this for specifically binary text encoding.

Frequently asked questions about the Text to Binary

How do I convert text to binary?

Paste your text and click convert. The tool converts each character to its 8-bit binary representation, with spaces separating bytes by default. "Hi" becomes 01001000 01101001.

What encoding should I use?

ASCII for English-only text (faster, simpler, 1 byte per character, but fails on non-English). UTF-8 for anything that might contain accented characters, emoji, or non-Latin scripts. UTF-8 is backward compatible with ASCII — use it by default.

Why does "é" become 2 bytes?

UTF-8 encodes accented characters like é as multi-byte sequences. The codepoint 0x00E9 requires 2 bytes in UTF-8: 11000011 10101001. One character, two bytes. This is normal UTF-8 behavior for any character above U+007F.

How many bits does one character take?

Depends on encoding and character. In ASCII or basic UTF-8 (English), 8 bits per character. In UTF-8 for accented or extended Latin characters, 16 bits (2 bytes). For Greek, Cyrillic, Hebrew, Arabic: usually 16 bits. For CJK ideographs: 24 bits (3 bytes). For emoji: 32 bits (4 bytes).

What is the binary for a space?

The ASCII space character (U+0020) is 00100000 in binary. It’s a real character with real bits, not "nothing". Tab is 00001001, newline is 00001010.

Can I convert emoji to binary?

Yes, in UTF-8 mode. Emoji are 4-byte UTF-8 sequences. The grinning face emoji (😀, U+1F600) encodes as 11110000 10011111 10011000 10000000 in UTF-8 — 32 bits for one emoji.

How do I convert binary back to text?

Use the companion Binary to Text tool. Paste the binary output and it reconstructs the original text. Round-tripping (text → binary → text) should return the original exactly.

Is my text private?

Yes. Encoding runs in your browser with no server involvement. Confidential text, internal identifiers, or any sensitive content stays on your machine.

Additional resources

Advertisement

Related tools

All Converters

Learn more

Explore more tools

200+ free tools that run in your browser.

Browse all tools →