CONVERTER · MATH · NUMBER SYSTEMS

ASCII to Hex: Text ↔ Hexadecimal Converter

Every letter you type is a number underneath, and hex is how programmers write those numbers. At the default, “Hi” becomes 48 69 — H is 72 (0x48), i is 105 (0x69), each written as one two-digit byte. Flip the direction to paste hex back and decode it, in spaces, 0x-prefixed, or continuous form.

500

Convert text to hex — or hex back to text

Text mode turns each character into its two-digit hex byte: H is 0x48, i is 0x69. Hex mode reads byte pairs back into characters and accepts space-separated bytes, 0x-prefixed bytes, or one continuous string. Programmers read hex instead of binary because one hex digit covers exactly four bits, so a byte is two short digits instead of eight long ones.

Pick which way to convert. Text-to-hex is the default, preloaded with “Hi” so the result is visible immediately.

Type text here, or hex here after switching direction. In hex mode, separate bytes with spaces, prefix them with 0x, or paste one continuous string of hex digits.

Changes only how the hex is displayed, not the bytes. Space-separated is easiest to read; 0x-prefixed matches code; continuous matches hashes and dumps.

Result—Enter values above

Enter values to see the result.

The worked example, line by line

Setup: text “Hi”, direction text to hex, space-separated style.

Line 1 — look up each character. H is ASCII code 72; i is code 105.

Line 2 — convert to hexadecimal. 72 in base 16 is 48 (4 × 16 + 8); 105 is 69 (6 × 16 + 9). Each byte becomes exactly two hex digits.

Line 3 — join with spaces. The result is 48 69 — 2 bytes for a 2-character word. With the 0x style it reads 0x48 0x69; continuous, 4869.

Line 4 — check the round trip. Switch direction, paste 48 69 back, and the converter returns “Hi”. A hex string with an odd number of digits, a non-hex character, or a non-ASCII character in text mode is reported as an error instead of silently producing wrong output.

Why programmers read hex, not binary

Binary for “Hi” is 01001000 01101001 — 16 digits to read. Hex for “Hi” is 48 69 — 4 digits for the same 2 bytes, because each hex digit stands for exactly 4 bits. That is why memory dumps, color codes, hashes, and network packets are all shown in hex: it is binary, compressed to a quarter of the length, with no information lost. One byte is always two hex digits, which is also why an odd-length hex string can never be valid — a byte cannot be half a digit.

ASCII-to-hex reference

CharacterDecimal codeHex byteNote
H7248First byte of the default example.
i10569Second byte of the default example.
A6541Uppercase letters run 65–90 (41–5A hex).
a9761Lowercase letters run 97–122 (61–7A hex); exactly 32 above uppercase.
04830Digits run 48–57 (30–39 hex). Note: the character “0” is not the value zero.
(space)3220The space character itself is a byte, not a separator here.
!3321Punctuation lives in the 33–47 and 58–64 ranges.
~1267EThe last printable ASCII character.

Output · formula · meaning

OutputFormulaWhat it means
Hex for a characterASCII code in base 16, two digits, uppercaseH (72) → 48; padding keeps every byte two digits.
Hex for a wordone byte per character, joined per the chosen style“Hello” → 48 65 6C 6C 6F — 5 bytes, 10 hex digits.
Text from hexeach byte pair back to its ASCII code69 → 105 → i.
Byte counthex digits ÷ 248 69 is 4 hex digits = 2 bytes. An odd digit count is an error, not a guess.

Who uses this

  • The computer science student: checks homework by hand — converts “Hello” to 48 65 6C 6C 6F and confirms the base-16 conversion before an exam.
  • The web developer: reads a color or a URL-encoded byte and translates it back to its character to find a bug in an encoded string.
  • The hobbyist programmer: sanity-checks a data dump, converting a suspicious byte pair back to its character to spot an off-by-one error.
  • The teacher: shows a class why hex exists at all, putting binary (01001000 01101001) and hex (48 69) for “Hi” side by side on the board.

Accuracy & limitations

This converter covers printable ASCII only (codes 32–126). It does not handle accented letters, emoji, or other Unicode characters — those need UTF-8, where a character can occupy multiple bytes, and they are reported as errors here rather than silently mangled. Control characters (codes 0–31) and delete (127) are likewise excluded. Hex input must use only 0–9 and A–F (either case), in complete byte pairs; an odd-length string, a non-hex character, or an empty input is reported as an error with the problem named.

Cite this calculatorBright Side Kit. “ASCII to Hex Converter: Text to Hexadecimal Code Tool.” brightoolbox.com, 2026.Bright Side Kit. "ASCII to Hex Converter: Text to Hexadecimal Code Tool." https://brightoolbox.com/ascii-to-hex/ Accessed October 24, 2026.Data sources
  • ASCII standard (ANSI X3.4): printable characters codes 32–126; A = 65, a = 97, 0 = 48, space = 32.
  • All conversions computed in-page from the stated rules: one byte per character, two uppercase hex digits per byte.
Embed this calculator

Paste this into any web page to embed the live calculator. The “Bright Side Kit” link below it must stay intact.

Frequently asked questions

What is Hi in hex?

48 69. H is ASCII code 72, which is 48 in hexadecimal; i is code 105, which is 69. Each character becomes exactly one byte, two hex digits.

What is Hello in hex?

48 65 6C 6C 6F. H = 48, e = 65, l = 6C, l = 6C, o = 6F — five bytes, ten hex digits. Notice the double l appears twice, as it should.

What is lowercase a in hex?

61. Lowercase a is ASCII code 97, which is 61 in hex. Uppercase A is 65, or 41 in hex — exactly 32 lower, which is why case differs by one hex digit in the high nibble.

Can I convert hex back to text here?

Yes — switch the direction to Hex → Text. Paste space-separated bytes (48 69), 0x-prefixed bytes (0x48 0x69), or one continuous string (4869). All three decode to “Hi”.

Why does an odd-length hex string fail?

Because a byte is two hex digits. A string like “486” has three digits, so the last byte is half missing. The converter reports it instead of inventing a digit, which would silently change the decoded text.

What is the difference between ASCII to hex and ASCII to binary?

Same bytes, different notation. Binary writes each byte as 8 bits (Hi = 01001000 01101001); hex writes it as 2 digits (Hi = 48 69). Hex is shorter and is what programmers, debuggers, and color pickers actually display.

Why does the converter reject accented letters and emoji?

Because they are not ASCII. This tool covers printable ASCII only (codes 32–126). Accented letters and emoji live in Unicode and need UTF-8 encoding, where one character can take several bytes. Converting them as if they were ASCII would produce wrong output, so the converter says so instead.

Does case matter in hex input?

No. 6c and 6C decode to the same byte, and 4869, 48 69, and 0x48 0x69 all decode to “Hi”. Output is uppercase by convention; input accepts either case.