Text to Binary Converter

Turn text into binary, hexadecimal or decimal bytes, and back again.

Encoding & Conversion Free, no sign-up Runs in your browser

Text to Binary Converter tool

Direction
0
Characters
0
Bytes (UTF-8)

About the Text to Binary Converter

Text to Binary Converter shows what a piece of text looks like as the bytes a computer actually stores. Every character is encoded as UTF-8 and then written out in the base you choose: binary for the classic eight-digit groups, hexadecimal for a compact two-digit form, or decimal for the raw byte values.

Conversion runs both ways. Paste a string of ones and zeros and you get the original text back, with whitespace between groups ignored so values copied out of a document still work. The same applies to hexadecimal, which may be written with or without separators.

Because the encoding step is UTF-8, characters outside the English alphabet come through correctly. An accented letter takes two bytes, most emoji take four, and both convert back to exactly what you started with. Simpler converters that assume one byte per character break on anything but plain English, which is the usual reason a conversion comes back as question marks.

How to use the Text to Binary Converter

  1. Choose a directionText to bytes, or bytes back to text.
  2. Pick a formatBinary, hexadecimal or decimal.
  3. Enter your contentType text, or paste the byte values you want to read.
  4. Copy the resultThe converted output appears as you type.

Features

  • Binary, hexadecimal and decimal output
  • Converts in both directions
  • Correct UTF-8 encoding for accented characters and emoji
  • Choice of separator between groups, including none
  • Ignores whitespace when reading values back
  • Clear message when input is not valid for the chosen format
  • Shows the byte count of the text

Who uses this tool

The text to binary converter is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:

  • Showing students how characters are stored as numbers
  • Reading a byte dump from a log or a protocol trace
  • Preparing a binary representation for a puzzle or a game
  • Checking how many bytes a string really occupies
  • Converting a hexadecimal string back into readable text

Frequently asked questions

Why does one character sometimes become more than eight bits?

Because UTF-8 uses one byte for the basic English characters and two to four bytes for everything else. An accented letter is two bytes, so sixteen bits, and most emoji are four bytes, so thirty-two.

Does binary text hide anything?

No. Converting to binary is a representation, not encryption. Anyone can convert it straight back, so it provides no protection for anything private.

What separator should I use?

A space between groups is the most readable and is what most examples use. No separator produces a continuous string, which is compact but hard to check by eye. Both convert back correctly.

Why does my binary fail to convert back?

Usually because the total number of digits is not a multiple of eight, which means a group is incomplete, or because a character other than 0 and 1 crept in. The message names which problem it found.

Is this the same as ASCII?

For plain English text, yes: UTF-8 and ASCII agree on the first 128 characters, so the byte values are identical. They diverge as soon as you use a character outside that range.

Is there a size limit?

No fixed limit, though binary output is eight times longer than the byte count, so a long document produces a very large block of digits.

If the text to binary converter is not quite what you need, these other free tools solve closely related problems.

Number Base Converter

Convert a number between binary, octal, decimal, hex and custom bases.

Encoding & Conversion Use tool

Base64 Encoder

Encode any text, including emoji and accents, to a Base64 string.

Encoding & Conversion Use tool

Hash Generator

Generate cryptographic hashes of text, computed in your browser.

Developer Tools Use tool

Morse Code Translator

Convert text to Morse code and back, with audio playback of the result.

Encoding & Conversion Use tool

Character Counter

Character, word, line and paragraph counts that update as you type.

Text Tools Use tool