filemarkr
All ToolsGuides
filemarkr

60+ free developer tools that run entirely in your browser — JSON formatter, JWT decoder, Base64, diff checker, regex tester, hash generator and more. No upload, no sign-up, completely private.

JSON & Data

  • JSON Formatter
  • JSON Minifier
  • JSON Validator
  • JSON to CSV
  • CSV to JSON
  • JSON to YAML

Encode & Decode

  • Base64 Encode / Decode
  • Base64 to Image
  • Image to Base64
  • URL Encode / Decode
  • HTML Entity Encoder
  • JWT Decoder

Text Tools

  • Text Diff Checker
  • Case Converter
  • Word & Character Counter
  • Slug Generator
  • Remove Duplicate Lines
  • Sort Text Lines

Generators

  • UUID Generator
  • Password Generator
  • Lorem Ipsum Generator
  • QR Code Generator
  • Random Number Generator
  • NanoID Generator

Popular Guides

  • How to Format and Pretty-Print JSON (Without Breaking It)
  • How to Minify JSON and Shrink Your API Payloads
  • How to Validate JSON and Pinpoint the Exact Syntax Error
  • How to Convert JSON to CSV for Excel and Google Sheets
  • How to Convert CSV to JSON (With Proper Header Detection)
  • All guides →

Explore

  • All Tools
  • JSON Formatter
  • JWT Decoder
  • Diff Checker
  • UUID Generator

Company

  • About
  • Privacy
  • Terms
  • Sitemap

Our Promise

  • 100% in your browser
  • Zero uploads
  • No sign-up, always free

© 2026 filemarkr. Designed & developed by Naved Naik.  All processing happens locally in your browser.

All guides

Converters

Text to Binary: How Characters Become Bits (and Back Again)

See exactly how text turns into binary, hex, octal and decimal through character encoding, with runnable examples and Unicode gotchas explained.

Try the toolText to Binary →

What does "text to binary" actually mean?

Computers store no letters — only numbers, and ultimately only bits. When you type A, the machine records the number 65, and stores that as the byte 01000001. "Converting text to binary" is really the act of looking up each character's numeric code and writing it out in base 2. It is a great way to demystify encoding, debug data at the byte level, or build a little puzzle or lesson.

The same idea extends to other bases: hexadecimal, octal and decimal are just different notations for the same underlying code points.

Character encoding in one minute

The mapping from characters to numbers is defined by a character encoding. For the basic English letters, digits and punctuation, ASCII assigns each a value from 0 to 127, which fits in a single 7- or 8-bit byte. Modern text uses UTF-8, a superset of ASCII that encodes the full Unicode range. Crucially, UTF-8 is variable-width: characters outside ASCII use two, three or four bytes.

  • A → code point 65 → one byte: 01000001
  • i → code point 105 → one byte: 01101001
  • é → code point 233 → two UTF-8 bytes: 11000011 10101001

This is why an emoji or accented letter produces more bits than a plain ASCII character — it simply takes more bytes to represent.

A practical walkthrough

To convert reliably across the whole Unicode range, encode the string to UTF-8 bytes first, then format each byte in the base you want. Here it is in JavaScript:

function textToBinary(str) {
  const bytes = new TextEncoder().encode(str); // UTF-8 bytes
  return Array.from(bytes)
    .map(b => b.toString(2).padStart(8, "0"))
    .join(" ");
}

textToBinary("Hi");  // "01001000 01101001"
textToBinary("H");   // "01001000"

// Same bytes in other bases:
Array.from(new TextEncoder().encode("Hi"))
  .map(b => b.toString(16).padStart(2, "0")).join(" "); // "48 69" (hex)

Decoding is the mirror image: parse each group back to a number, put the bytes in a Uint8Array, and run new TextDecoder().decode(...). Rather than wiring this up by hand, paste your string into the Text to Binary tool, pick binary, hex, octal or decimal, and copy the result — or paste code the other way to decode it. Everything runs locally in your browser.

Common pitfalls and tips

  • Padding matters: Bytes are conventionally shown as 8 bits with leading zeros. Dropping them (1000001 instead of 01000001) makes the stream ambiguous when you try to decode it.
  • Delimiters: Separate each byte with a space so a decoder knows where one character ends. Continuous streams like 0100100001101001 require you to know the width in advance.
  • Unicode is multi-byte: A single visible character can be several bytes. Do not assume one character equals one byte — that only holds for ASCII.
  • Byte code vs. code point: For non-ASCII text, the UTF-8 bytes differ from the raw Unicode code-point number. Decide which representation you actually want.

Once your data is in bytes, you might also reach for Base64 Encode / Decode to make it transport-safe, or the Number Base Converter to move a single value between bases.

Conclusion

Text-to-binary conversion is nothing more than character encoding made visible: each character has a numeric code, and binary, hex, octal and decimal are alternate spellings of that code. Keep the bytes padded and delimited, remember that Unicode characters can span several bytes, and you will be able to read, write and debug encoded text with confidence.

More guides

How to Format and Pretty-Print JSON (Without Breaking It)

Read

How to Minify JSON and Shrink Your API Payloads

Read

How to Validate JSON and Pinpoint the Exact Syntax Error

Read

How to Convert JSON to CSV for Excel and Google Sheets

Read