Home/Developer Tools/Text to ASCII / Binary / Hex
🔡

Text to ASCII / Binary / Hex

Convert text to ASCII codes, binary, hex or decimal and back

Free · No sign-up required

Text is always numbers underneath

Every character a computer displays is stored as a number — the letter A is, at some layer, the number 65. This converts text into that underlying numeric representation and back, across the five forms that come up most often when working with encodings, debugging data, or piecing together how text is actually stored: ASCII codes, UTF-8 hex bytes, Base64, and raw byte values.

The five modes

ModeWhat it produces
Text to ASCII CodesEach character's decimal code point — A becomes 65, a becomes 97
ASCII Codes to TextThe reverse — decimal codes back into readable characters
Text to UTF-8 HexThe raw hexadecimal bytes of the UTF-8 encoding, which matter for anything beyond plain ASCII
Text to Base64The same text-to-binary-to-Base64 encoding used throughout web and email data
Byte Values to ASCIIRaw numeric byte values converted back into their character equivalents

Why ASCII and UTF-8 hex give different-length answers

ASCII only covers 128 characters — English letters, digits and basic punctuation — each needing exactly one byte. UTF-8, the encoding that covers essentially every character in every language, is variable width: an ASCII character still takes one byte in UTF-8, but an accented letter, a Thai character or an emoji can take two, three or four bytes. Converting the same piece of text to ASCII codes and to UTF-8 hex gives identical results for plain English text and diverges the moment anything outside basic ASCII is involved — which is exactly the case where knowing the real byte representation matters.

Where this actually gets used

  • Debugging encoding issues. Text that displays as mangled symbols usually means it was decoded with the wrong character set — seeing the raw bytes is how you diagnose that.
  • Learning how character encoding works by seeing the actual numbers rather than an abstract explanation.
  • Constructing or decoding low-level protocol data where a message spec is defined in terms of specific byte or ASCII values.
  • Puzzle and CTF contexts where a string of numbers is a straightforward character-code cipher.

Frequently asked questions

What's the difference between ASCII codes and UTF-8 hex for plain English text?

For plain ASCII characters, they represent the same underlying value — the difference only appears with characters outside basic ASCII, which UTF-8 encodes using multiple bytes.

Why did converting my emoji or Thai text to ASCII fail or look wrong?

ASCII only covers 128 basic characters. Anything outside that range needs UTF-8 hex mode, which correctly represents the multi-byte encoding those characters actually use.

Is Base64 the same as encryption?

No — Base64 is an encoding, fully and trivially reversible by anyone, not a security measure. It makes binary data safe to include in text formats; it does not hide or protect the content.

Can I convert numbers back to text if they're separated by spaces or commas?

Yes — the reverse modes generally accept common separators between the numeric values.

Why do some byte values not convert to a printable character?

Many byte values, particularly below 32 and above 126 in plain ASCII, are control characters or require a specific encoding context to render meaningfully rather than as printable text.

Is my text sent anywhere?

No. All conversion happens locally in your browser.

More tools in this category

🔐
Base64 Encoder & Decoder
Encode and decode text in Base64 format
🔢
Number Base Converter
Convert between binary, decimal, hex, octal and text
📤
Gzip / Deflate Decompressor
Decompress a .gz or raw deflate file back to its original bytes
🌐
IP Address Converter
Convert an IPv4 address between dotted decimal, binary, hex and integer
Bitwise Calculator
AND, OR, XOR, NOT and bit-shift two numbers with the binary shown
🔢
Word Counter
Count characters, words, sentences, paragraphs and lines