Home › Unit Converters › Text to Hex Converter

Text to Hex Converter

Turn any text into its hex form — the two-digit bytes that computers actually store — or turn hex back into readable text. This text to hex converter uses UTF-8, the encoding of the web, so it handles everything from plain English to ₹ and emojis. Choose how the hex looks: with or without spaces, with a 0x prefix for code, upper or lower case. Paste hex in the decode direction and invalid input gets a clear error, not a garbled guess.

48 69
2 characters → 2 bytes

How to use this text to hex converter

  1. Pick the direction: Text → Hex to encode, Hex → Text to decode.
  2. Type or paste into the box. The result updates as you type.
  3. For encoding, choose the style you need — spaces or no spaces between bytes, a 0x prefix for code, upper or lower case letters.
  4. For decoding, paste hex with or without spaces, commas or 0x prefixes — the tool cleans it up, checks it, and shows an error if a byte is missing or a character is not hex.
  5. Use Copy result to take the output with you.

How it works

Text on a computer is stored as numbers. Under the UTF-8 encoding — the standard for the web — every character becomes one to four bytes, and a byte is written in hex as exactly two digits from 00 to FF. Basic English characters cost one byte each, so the conversion looks direct: H is byte 72 in decimal, which is 48 in hex. Accented letters cost two bytes, symbols like ₹ cost three, and emojis cost four. Decoding runs the film backwards: pairs of hex digits become bytes, and the bytes are read as UTF-8 to rebuild the characters.

Text → bytes (UTF-8) → each byte = two hex digits  ·  "Hi" = 48 69  ·  "₹" = E2 82 B9  ·  one hex digit = 4 bits, so one byte = two hex digits

Strictness matters in the decode direction. A hex string must pair up — an odd number of digits means a byte is missing — and the resulting bytes must form valid UTF-8. This converter refuses both cases with a plain-English error instead of inventing characters, because a silent wrong decode is worse than no decode.

Worked example

Take the word "Hi":

Step 1: H is byte 72 in decimal → 48 in hex. i is byte 105 → 69 in hex.
Step 2: Join the bytes — 48 69.
Step 3: With the 0x style the same bytes read 0x48 0x69.

Now a harder one: ₹. Its UTF-8 encoding is three bytes — E2 82 B9 — and an emoji like 😀 is four bytes, F0 9F 98 80. Paste any of these into the decode direction and you get the exact character back. These are the default values in the converter above.

Common characters in hex

CharacterWhat it isHex (UTF-8)
spaceSpace73 70 61 63 65
0Digit zero30
9Digit nine39
ACapital A41
aSmall a61
HCapital H48
!Exclamation mark21
₹Rupee sign (3 bytes)E2 82 B9
😀Grinning face emoji (4 bytes)F0 9F 98 80

Notice the pattern: every English letter and digit is a single byte in the 20–7A range, while symbols from Indian languages and emoji need several bytes — which is why a 160-character SMS in Hindi fills up faster than one in English.

FAQ

What is hex, and why do computers use it?

Hex (hexadecimal) is a base-16 number system using digits 0–9 and letters a–f. Computers use it because one hex digit stands for exactly 4 bits, so a byte is always exactly two hex digits — 'Hi' becomes 48 69. It is a compact, exact way to write the raw bytes behind text, colours, memory addresses and files.

How is text converted to hex?

Each character is first turned into bytes by its encoding — normally UTF-8 — and each byte is written as two hex digits. Plain English letters take one byte each: H is 48, i is 69. Characters outside basic English take more: the rupee sign ₹ is three UTF-8 bytes, E2 82 B9, and most emojis take four bytes.

Why does ₹ show as E2 82 B9?

Because ₹ (U+20B9) does not fit in a single byte. UTF-8 encodes it in three bytes — E2 82 B9 — following fixed rules that spread the character's code point across the bytes. Any correct hex decoder reads those three bytes back as ₹, which is why the round trip in this converter restores the exact character.

What does the 0x prefix mean?

0x is a marker programmers put before a hex number so it is not mistaken for a decimal number — 0x48 is the byte 48 in hex (the letter H). It changes nothing about the value. Tick '0x prefix' in this converter if you are pasting bytes into code; leave it off for plain hex strings.

Why did my hex fail to decode?

Hex text must have an even number of hex digits (two per byte) and can only contain 0–9 and a–f. An odd length or a stray character makes decoding impossible, and this converter says so rather than guessing. The other common cause: the bytes are valid hex but not valid UTF-8 text — for example a single byte like FF on its own — in which case the tool reports that the bytes are not readable text.

Is ASCII hex different from UTF-8 hex?

For the 128 basic ASCII characters — English letters, digits and common punctuation — they are identical, because UTF-8 was designed to match ASCII for those. They differ as soon as a character goes beyond ASCII: ASCII cannot represent ₹ or an emoji at all, while UTF-8 encodes them in two to four bytes. This converter always uses UTF-8, the web standard.

Can I use the Text to Hex Converter on my phone?

Yes. The Text to Hex Converter runs in your phone's browser, so there is nothing to download or install. The layout adjusts to small screens and the calculation works exactly the same as on a computer.

What details do I need for the Text to Hex Converter?

It asks for direction, text to convert and byte separator. Enter those values, press Calculate, and the result is worked out instantly. If you are unsure about a value, the worked example on this page shows a typical case you can copy first.