Home Tools Blog About

Convert String to Binary

In short

Convert text to binary and back with per-character UTF-8 breakdown. Grouped, continuous, hex output. Free, offline, client-side, instant, secure.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up

Convert text to binary (and back) with a per-character UTF-8 breakdown showing codepoint, byte count, hex, and binary for every input character. Emoji and non-ASCII characters expand into their multi-byte UTF-8 sequences visibly - no silent encoding surprises.

Per-character breakdown

Type to begin.
🛡
100% PrivateNo server uploads, ever
InstantRuns in your browser
💧
No WatermarksClean output, always
🆓
Free ForeverNo accounts, no limits

How to Use Convert String to Binary

  1. Type or paste text. ASCII letters work, but so do emoji (😀), accented characters (é), CJK (你好), and arbitrary Unicode. The tool uses UTF-8 encoding - the same encoding the modern web defaults to - so any character your keyboard or paste-buffer can produce gets converted correctly.
  2. Pick a grouping style. Per-byte separates each byte with a space (most readable for ASCII). Continuous removes all spaces (for languages or systems that want a raw bit stream). Per-character groups all bytes of each character into one block - useful for inspecting which characters are multi-byte.
  3. Read three output views. Binary output up top, UTF-8 hex below it (shorter and easier to compare against a hex table), and the per-character grid lower down with one row per character showing the codepoint (U+1F600), UTF-8 byte count, hex bytes, and binary bytes. Multi-byte characters jump out instantly.
  4. Inspect emoji and non-ASCII. Type 😀 and the grid shows U+1F600 · 4 bytes · F0 9F 98 80 · 11110000 10011111 10011000 10000000. Visible confirmation that emoji are not single bytes - a common misconception. The first byte's high bits (11110) tell you it's a 4-byte UTF-8 sequence.
  5. Switch direction with Swap. ⇄ flips to Binary → Text. Input accepts any whitespace separator (spaces, tabs, newlines), strips 0b prefixes and commas. The tool validates each 8-bit byte, decodes as UTF-8 strictly, and rejects sequences that aren't valid UTF-8 with a specific error.
  6. Batch mode. Paste multiple lines and the output becomes a TSV table with columns Input / Binary / Hex / Bytes / Bits. Download as .tsv and it opens directly in Excel or Google Sheets with proper columns. Each line is converted independently - one bad line doesn't fail the whole batch.
  7. Stats summarize. Character count vs codepoint count vs byte count vs bit count, plus how many input characters needed more than one UTF-8 byte. A 5-char ASCII string is 5 bytes (40 bits). A 5-char string with one emoji is 8 bytes (64 bits) - the math is suddenly different.

Frequently Asked Questions

Does it really handle emoji and non-ASCII correctly?

Yes. The tool iterates the input by Unicode codepoint (not by JavaScript char), so surrogate pairs for high codepoints like emoji stay together. Each codepoint is encoded as UTF-8 – 😀 (U+1F600) becomes the 4-byte sequence F0 9F 98 80, shown in the grid. Most “string to binary” converters treat each JS char as one byte and produce wrong results for emoji and non-BMP characters.

Can I convert binary back to text?

Yes – click Swap. The reverse parser is lenient about input formatting: 01001000 01101001, 01001000,01101001, 0b01001000 0b01101001, and 0100100001101001 all decode to Hi. The total bit count must be a multiple of 8; otherwise you get an error like “Total 13 bits – must be a multiple of 8 (last byte is 5 bits)”.

What happens with invalid UTF-8 in reverse mode?

Caught and reported. The decoder uses strict mode (fatal: true) so byte sequences that aren’t valid UTF-8 – for example a lone continuation byte 10101010 with no lead byte – fail with a specific error rather than silently producing the U+FFFD replacement character. This lets you spot data corruption instead of papering over it.

What’s the difference between the three grouping options?

Per-byte adds a space after every 8 bits – most readable for ASCII text. Continuous removes all whitespace – useful when you need a raw bit stream to paste into another tool. Per-character keeps all bytes of one codepoint together with no internal space, with single spaces between characters – useful when you want to see at-a-glance which characters expand into multi-byte sequences.

Why is the hex output shown alongside binary?

Hex is the same bytes in base 16, denser, and easier to compare against UTF-8 reference tables. For ASCII, hex byte 41 = decimal 65 = 01000001 binary = letter A. For emoji 😀, hex F0 9F 98 80 is much faster to read than 32 bits of binary. The Copy report includes both.

What’s the input size limit?

200,000 characters. Beyond that the per-character grid would slow down browsers (each row is a DOM node) and the binary output becomes too large to handle smoothly. Hit the cap and you get a clear error “Input too large – cap is 200,000 characters”. The grid itself caps at 256 displayed rows with a “… N more characters” note, but conversion still processes the full input.

How does the grid show whitespace characters?

The Char column substitutes visible glyphs for invisible whitespace so the row isn’t blank: space → · (middle dot), newline → ↵, tab → →. The actual encoded bytes are still 20, 0A, 09 respectively, shown correctly in the Hex and Binary columns. Useful when you’re auditing what’s actually in your text.

Is there a way to use UTF-16 or another encoding?

No – this tool emits UTF-8 only. UTF-8 is the dominant encoding on the modern web and the natural choice for text-to-binary conversion. If you specifically need UTF-16 or windows-1252 binary output, you’ll need a more specialized encoder – most use cases (debugging encoding issues, learning computer science, archival storage) want UTF-8.

Is my input uploaded anywhere?

No. All UTF-8 encoding, binary formatting, per-character analysis, and TSV emission run in your browser using the standard TextEncoder and TextDecoder APIs. Open DevTools → Network and confirm zero requests fire – even when you Convert or Download. Safe for sensitive text, secrets, or anything you’d rather not send to a third-party converter.

Does it work offline?

Yes. Total bundle is about 18 KB. Load once, disconnect, keep using. The conversion is pure local computation – no fonts to fetch (system font stack), no analytics, no API. Useful for offline development, airgapped environments, or when you don’t trust the network you’re on.

Keep going

Related Tools

All Binary tools →

Binary to String Converter

Decode binary to text - UTF-8, Latin-1, or 7-bit ASCII, auto-detect format, handle emoji.…

Calculate Bitwise AND of Binary Values

Calculate Binary Values Online Free - Fast and accurate binary computations for developers, students,…

Binary to Decimal Converter

Convert extremely large machine binary strings natively into format decimal bounds infinitely fast offline…

Calculate Binary Addition

Calculate Binary Addition numbers with carry visualization and multi-format output. Free, offline, client-side, instant…

Binary to Gray Code Converter

Convert binary to Gray code (BRGC) - XOR algorithm, bit-width preserved, step-by-step display, BigInt.…

Binary to Image Converter

Render binary as a pixel image - multiple color schemes, pixel scaling, PNG export,…

Binary to IP Converter

Convert 32-bit binary to IPv4 or 128-bit binary to IPv6 - with classification, canonical…

Binary to IPv6 Converter

Convert 128-bit binary to IPv6 addresses - RFC 5952 canonical form, special-range detection. Free,…

Binary to Negabinary Converter

Convert binary to negabinary (base -2) - handles signed input, BigInt precision, no sign…

Convert Binary to Octal

Convert binary to octal (base 8) - 3-bit grouping, prefix options, BigInt precision, batch…

Convert Decimal to Binary

Convert decimal numbers to binary instantly, one value or a whole list at a…

Convert Gray Code to Binary

Decode Gray code (reflected binary) to standard binary, decimal, or hex. BigInt-safe, per-line errors,…

Share

Embed this tool

Add this free tool to your website. Copy and paste the code: