Text to Hex Converter

Convert text to hexadecimal bytes, and hex back to text.

Result

48 65 6c 6c 6f 2c 20 53 75 70 65 72 77 65 62 6b 69 74 21 20 f0 9f 98 80
1 lines · 71 bytes
  • 24 bytes from 21 characters. Text is encoded as UTF-8, so é is two bytes and an emoji is four.

What is text in hexadecimal?

Every piece of text is stored as numbers called bytes. Hexadecimal (hex) is a short way to write those bytes: each byte becomes two characters from 0-9 and a-f. The letter H is the byte 48, so "Hi" is 48 69.

This tool encodes your text as UTF-8, the encoding used on almost the whole web. Plain English letters take one byte each. An accented letter such as é takes two bytes (c3 a9), and an emoji takes four. You can also go the other way: paste hex and read the text.

How to use the Text to Hex Converter

  1. Type or paste your text in the input box.
  2. Leave Direction on "Text to numbers" and keep Number system on Hexadecimal.
  3. Choose a separator, an optional 0x prefix and upper or lower case.
  4. Copy the result. To reverse it, switch Direction and paste hex.

Real situations

When people use the Text to Hex Converter

  • 1

    Read bytes in a network or file dump

    Debugging tools often show data as hex. Paste the bytes here to see whether they are readable text and what they say.

  • 2

    Write a string as byte values in code

    Some languages and protocols want bytes as numbers. Convert a short text, copy it with a 0x prefix, and paste it into your source.

  • 3

    Check how many bytes a text really uses

    The note under the result counts bytes and characters, which helps when a field has a byte limit and your text has accents or emoji.

  • 4

    Spot hidden characters

    A stray space, tab or odd symbol shows up as its own byte, such as 20 for a space or c2 a0 for a non-breaking space.

Good to know

  • Hex digits come in pairs, one pair per byte, so a valid hex string has an even number of digits.
  • Upper and lower case hex mean the same thing: 4F and 4f are equal.

FAQ

Text to Hex Converter: questions answered

Does it use ASCII or UTF-8?

UTF-8. For plain English letters and digits the bytes are identical to ASCII, so "Hi" is 48 69 either way. For other characters UTF-8 uses two to four bytes. For example, é becomes c3 a9 and a smiling face emoji becomes four bytes, f0 9f 98 80.

How do I convert hex back to text?

Switch Direction to "Numbers to text" and paste the bytes. Spaces, commas, 0x prefixes and \x escapes are all understood. For example, 48 65 6c 6c 6f reads as Hello. If the bytes are not valid UTF-8 the tool tells you.

Why is the byte count higher than the character count?

Because characters outside basic English use more than one byte in UTF-8. The sample text in the tool has 21 characters but 24 bytes, since the emoji alone takes four bytes. Counting bytes matters for database columns and network fields.

What are the other number systems for?

Besides hex you can show the bytes in binary, octal or decimal. The letter A is 41 in hex, 01000001 in binary, 101 in octal and 65 in decimal. They are the same byte written four ways.

Is hex a kind of encryption?

No. Hex is only a different way to write the same bytes. Anyone can turn it back into text instantly, so never use it to hide a password or secret.

What does the 0x prefix mean?

It is a common marker meaning "the following is hexadecimal", used in C, JavaScript, Python and many other languages. It is optional here: turn the prefix on if your code needs it, and leave it off if you just want the raw bytes.

Is this Text to Hex Converter free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way