Beginner

Text to Hex Converter

Type any text and instantly see its hexadecimal representation. Each character is converted to its Unicode code point expressed as an upper-case hex pair, joined by spaces.
Each character is converted to its Unicode code point in hexadecimal
Hex output
48 65 6C 6C 6F
Characters
5
Bytes (UTF-8)
5
'H' → 0x480x48
'e' → 0x650x65
'l' → 0x6C0x6C
'l' → 0x6C0x6C
'o' → 0x6F0x6F
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Text-to-hex converts every character to its Unicode code point in base-16. "Hello" becomes "48 65 6C 6C 6F". ASCII characters always need two hex digits; higher Unicode values need three to six. UTF-8 byte count may exceed character count for non-ASCII text.

Formula
hex(c) = charCodeAt(c).toString(16).toUpperCase().padStart(2, "0") for each character c
How this is calculated

Every character a computer stores has an integer code point defined by the Unicode standard. For the familiar ASCII range — letters, digits, punctuation — that code point is between 0 and 127 and always fits in exactly two hex digits: "A" is 0x41, "a" is 0x61, space is 0x20. This calculator takes each character in your input, looks up its Unicode code point, formats it as an upper-case hexadecimal string left-padded to at least two digits, then joins the pairs with spaces so the output is easy to read token by token.

Hexadecimal (base-16) is the standard human-readable view of binary data across computing: HTML colour codes (#FF5733), URL percent-encoding (%20 for space), SHA hash outputs, and machine-code listings are all expressed in hex because one hex digit maps exactly to four bits and two hex digits map to one byte. Knowing hex lets you inspect the raw numeric value of every character, which is invaluable when diagnosing encoding bugs or understanding data at the byte level.

For characters above U+007F — accented letters, CJK ideographs, emoji — the code point exceeds 255, so more than two hex digits appear. The UTF-8 byte count shows how much storage those characters actually use on disk or over the network: UTF-8 encodes ASCII in 1 byte, common European characters in 2 bytes, most CJK in 3 bytes, and emoji/rare scripts in 4 bytes.

Frequently asked questions

Each pair of hex digits is the base-16 representation of that character's Unicode code point. "H" (code point 72) becomes 48, "e" (101) becomes 65, and so on. Reading the pairs left-to-right reconstructs the original string. For basic Latin characters this is also the raw byte value stored in ASCII or UTF-8 files.

Two hex digits can only represent values 0–255. Characters with code points above 255 — Greek, Arabic, Chinese, emoji — need three, four, or five hex digits. For example the euro sign € is U+20AC, shown as 20AC. In UTF-8, this value is stored as 3 bytes (E2 82 AC), although this calculator shows the code point, not the UTF-8 byte sequence.

Hex is everywhere in computing: HTML colours (#FF5733), CSS, URL encoding (%20 for space), UUID identifiers, SHA hash strings, and machine code. When debugging character-encoding issues, switching the view to hex immediately reveals multi-byte sequences, invisible control characters (0x00, 0x0D), or unexpected byte order marks (0xFEFF).

Also known as

string to hexadecimal
ascii to hex encoder
unicode hex code lookup
convert words to hex
hex encoding tool
character to hex value

APA

TG we-Calculate Editorial Team. (2026). Text to Hex Converter [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/text-to-hex-calculator

Chicago

TG we-Calculate Editorial Team. "Text to Hex Converter." TG we-Calculate. 2026. https://we-calculate.com/calculator/text-to-hex-calculator.

IEEE

TG we-Calculate Editorial Team, "Text to Hex Converter," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/text-to-hex-calculator

BibTeX

@misc{wecalculate_text_to_hex_calculator, title = {Text to Hex Converter}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/text-to-hex-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?