Binary / Hex Converter

How to use 3 steps
  1. Enter your text or numbers under Text String or Numbers.
  2. Press Convert to Binary (01) or Convert to Hex.
  3. Copy the result.
Formatted Encoded Output

How this tool works

Each character of your input is converted to its numeric code and shown in base two or base sixteen, one group per character, separated by spaces.

Binary output is padded to eight digits per character and hexadecimal to two, which is why an eight-digit group is one byte and a two-digit group is the same byte written more compactly. The code used is the character's UTF-16 code unit as JavaScript reports it, so plain English text produces values from 32 to 126 and matches ASCII exactly. Characters beyond the basic Latin range have larger codes and will exceed the padding width rather than being truncated, and an emoji is stored as two code units and appears as two groups.

What the groups mean

  • Eight binary digits is one byte: the padding exists so that groups are the same width and can be read positionally. Without it, a space and a lowercase z would look like different-length numbers.
  • Hexadecimal is the same value, written shorter: each hex digit stands for exactly four binary digits, so two hex digits and eight binary digits carry identical information.
  • This is a representation, not encryption: anyone can convert it back in seconds. It obscures text from a casual glance and nothing more.
  • Non-Latin characters exceed the padding: an accented or non-Latin character has a code above 255 and produces a longer group. That is correct output, not a fault, but it breaks the neat one-byte-per-character reading.

What each group actually represents

The [msm_tool slug="binary-hex-converter"] converts each character of the input to its UTF-16 code unit — the number JavaScript itself uses internally to represent that character — and writes it out in base two or base sixteen. Plain English text produces values from 32 to 126, matching ASCII exactly, which is why binary and hex representations of ordinary text look so familiar.

Why every group is padded to a fixed width

Binary output is padded to eight digits per character and hex to two, so that every group is the same width and can be read positionally rather than needing to be counted out digit by digit. Without that padding, a space and a lowercase z would print as different-length numbers with nothing to show where one character's code ends and the next begins.

Hex is the identical value, written more compactly

Each hexadecimal digit stands for exactly four binary digits, so a two-digit hex group and an eight-digit binary group carry precisely the same information in a different notation — converting between them loses nothing and adds nothing, only changes how many characters it takes to write the number down.

Why an emoji produces two groups here

Characters outside the Basic Multilingual Plane are stored as two UTF-16 code units rather than one, so the conversion works per code unit and an emoji becomes two separate groups, neither of which is meaningful read alone. That count is specific to UTF-16: the same emoji encoded as UTF-8 bytes, which is what the Binary Translator uses, needs four bytes rather than two code units — a different, equally correct number arrived at through a different encoding.

A representation, not a form of protection

Converting text to binary or hex changes only how it is written, not what it says — anyone can reverse either form in seconds with no key and no effort required. It obscures text from a glance and nothing more.

One direction only, by design

This tool converts text into binary or hex and stops there. Going the other way — from binary back to text — needs validation that whole bytes were actually supplied and that the result forms valid text, which is a separate job the Binary Translator handles specifically.

Frequently Asked Questions

Specific to the Binary / Hex Converter. Broader questions about this category are answered on the category page.

Because a byte is eight bits, and padding to a fixed width makes the output readable in bytes. The leading zeros carry no value; 1000001 and 01000001 are the same number.
No. Binary is simply another way of writing the same number, and converting it back requires no key and no effort. It provides no confidentiality at all.
Because characters outside the basic multilingual range are stored as two code units, and the conversion works per code unit. Each half is a valid number but neither is meaningful alone.
This tool converts in one direction. The Binary Translator handles both directions and validates that the input is whole eight-bit bytes before decoding.
No. The conversion uses built-in character-code functions and runs locally.

Subscribe to receive notifications about new tools, features, and productivity tips.