Binary Text Converter

Convert text to binary or hex and back, using UTF-8 encoding. Runs entirely in the browser with no uploads.

Input: 0 chars | Output: 0 chars
About Binary Converter

Encode any text to 8-bit binary groups or hex pairs, and decode binary or hex back to text. Uses the browser's TextEncoder and TextDecoder so non-ASCII characters (emoji, accented letters, CJK) round-trip correctly.

Text encoding is the link between the characters you type and the bytes a computer actually stores. This tool handles the four conversions you need most often: text to binary, binary to text, text to hex, and hex to text. Every direction uses UTF-8 so emoji, accented Latin, Cyrillic, and CJK characters all encode to multi-byte sequences correctly rather than mojibake.

Text-to-binary runs the input through TextEncoder, converts each byte to an 8-bit binary string padded with leading zeros, and joins with single spaces. Binary-to-text strips everything that isn't a 0 or 1, groups the remaining digits into 8-bit chunks, and decodes. The hex directions work the same way with two-character lowercase pairs. The readme-style 'swap direction' button flips between a pair of modes and moves your current output into the input, which is handy when you want to verify a round-trip or chain conversions.

How to use the Binary Converter
  1. 1

    Select a conversion

    Use the tabs to pick Text to Binary, Binary to Text, Text to Hex, or Hex to Text. The input placeholder tells you what format to paste.

  2. 2

    Paste input and convert

    Drop your text or encoded data into the input. Click Convert to produce the output. The badge shows input and output character counts.

  3. 3

    Copy or round-trip

    Copy the output with one click, or hit swap direction to move the output into the input and flip to the opposite mode for verification.

Common use cases

Learn how encoding works

See exactly which bytes a given string produces to demystify UTF-8 for students and new developers.

Debug byte-level issues

Check hex output against an API response or a network capture to confirm a string is encoded the way you expect.

Encode messages for puzzles

Generate binary or hex versions of text for CTF challenges, escape rooms, or classroom exercises.

Sanity-check copy-paste artifacts

Paste suspect text and view its hex to spot hidden zero-width or non-breaking characters that visually look normal.

Frequently asked questions
Is data sent anywhere during conversion?

No. Encoding and decoding use the browser's TextEncoder and TextDecoder APIs. Nothing leaves your device.

Which encoding does it use?

UTF-8 in every direction. ASCII characters produce one byte, most Latin scripts produce one or two, and emoji and CJK characters produce three or four bytes each.

What happens to invalid binary or hex?

Non-0/1 characters in binary input and non-hex characters in hex input are stripped before grouping. Incomplete trailing groups are ignored so you always get a well-formed byte sequence.

Can I use this for files?

This variant is text-only. For file bytes, a hex-editor or dedicated file encoder is a better fit because this tool reads input as a single string.

Why are there spaces between the groups?

Readability. Groups are separated by single spaces so you can count bytes and compare manually. Binary-to-text and hex-to-text ignore those spaces and any other separators when decoding.

text