Skip to content
PickZeal
    Text and code tools

    Text to Hex Converter

    Convert text to hex and back. See the UTF-8 bytes, Unicode code points and HTML entities of any character, emoji included. Free and private.

    • Runs in your browser
    • Nothing is uploaded
    • Free, no sign-up
    Direction

    Text to hex conversion writes every character as hexadecimal numbers, the base-16 system computers use to show bytes. Most converters only handle plain English letters. This one works as a UTF-8 to hex and Unicode to hex converter for any language, turns emoji to hex, and shows both the UTF-8 bytes and the Unicode code point of each character, so you can see exactly how your text is stored.

    How to convert text to hex

    1. Type or paste your text into the Text box. The hex appears as you type.
    2. Choose UTF-8 bytes for how the text is stored in files and sent over the web, or Unicode code points for the character numbers.
    3. Pick a format, such as plain pairs, 0x prefixes or \x escapes.
    4. Click Copy result. To go the other way, click Swap direction or choose Hex to text.

    UTF-8 to hex vs Unicode to hex

    Every character has a number in the Unicode standard, written as U+ followed by hex digits. UTF-8, the encoding used by about 98% of websites, stores that number in 1 to 4 bytes. English letters and digits use a single byte with the same value as their code point, which is why text to hex and ASCII to hex give the same result for plain English. Accented letters, other alphabets and emoji need more bytes:

    CharacterCode pointUTF-8 bytesBytes
    A (Latin capital A)U+0041411
    é (e with acute accent)U+00E9C3 A92
    € (Euro sign)U+20ACE2 82 AC3
    😀 (Grinning face emoji)U+1F600F0 9F 98 804

    The byte patterns follow the UTF-8 rules in RFC 3629. Emoji such as flags, skin tones and families are made of several code points, so one emoji can be 8 bytes or more. The character breakdown table under the tool shows every part.

    Hex formats: with spaces, 0x, \x and more

    The same bytes are written differently depending on where you paste them. The default shows text to hex with spaces between bytes, which is easiest to read. Choose the format that matches your code or document:

    FormatUsed for
    48 69Reading and comparing bytes, hex editors
    0x48, 0x69Byte arrays in C, C++, Java and C#
    \x48\x69Escaped strings in Python, PHP, Bash and JavaScript
    %48%69URL (percent) encoding
    HiCharacters in HTML and XML
    \u{48}\u{69}Unicode escapes in JavaScript

    Hex to text decoder

    To convert hex to text, choose Hex to text and paste the hex. It also works as a hex to ASCII converter for plain English. Prefixes such as 0x, \x and % are removed automatically, and spaces or commas between values are optional. Code points written as U+0048, H or \u{48} are recognised too. If the bytes do not form valid UTF-8, the tool says so instead of showing garbled text, which usually means the data is binary or uses an older encoding such as Windows-1252.

    ASCII to hex table: letters and common characters

    You can read short hex by heart once you know a few ranges. For example, "I love you" in hex is 49 20 6C 6F 76 65 20 79 6F 75.

    CharactersHex
    Space20
    Digits 0 to 930 to 39
    Capital letters A to Z41 to 5A
    Small letters a to z61 to 7A
    Line break (new line)0A

    Capital and small letters differ by exactly 20 in hex: A is 41 and a is 61. Here is the hex code for every letter:

    Capital letterHex codeSmall letterHex code
    A41a61
    B42b62
    C43c63
    D44d64
    E45e65
    F46f66
    G47g67
    H48h68
    I49i69
    J4Aj6A
    K4Bk6B
    L4Cl6C
    M4Dm6D
    N4En6E
    O4Fo6F
    P50p70
    Q51q71
    R52r72
    S53s73
    T54t74
    U55u75
    V56v76
    W57w77
    X58x78
    Y59y79
    Z5Az7A

    To turn whole words or names into hex, type them into the converter above instead of looking up each letter.

    Your text stays private

    The conversion runs in your browser, so your text is never uploaded, stored or logged. That makes the tool safe for API keys, passwords and private messages. Need a QR code for the result? Try the QR Code Generator, or see all free in-browser tools.

    Frequently asked questions

    How do I convert text to hex?

    Type or paste your text into the box and this text to hex translator shows the result instantly. Each character is turned into its UTF-8 bytes, and each byte is written as two hex digits. For example, "Hi" becomes 48 69. Use the Format menu to add 0x prefixes, \x escapes or percent signs, then click Copy.

    How do I decode hex to text?

    Choose "Hex to text" and the tool works as a hex to text decoder. Paste the hex and the text appears. It accepts plain pairs such as 48 69, values with 0x, \x or % in front, and code points such as U+0048, H or \u{48}. Spaces and commas between values are optional.

    What is "I love you" in hexadecimal?

    "I love you" in hex is 49 20 6C 6F 76 65 20 79 6F 75. Each pair is one letter or space in UTF-8 (the same as ASCII for English letters): 49 is I, 20 is a space, 6C is l, and so on.

    Should I use UTF-8 to hex or Unicode to hex?

    A code point is the number Unicode gives a character, such as U+20AC for the euro sign. UTF-8 bytes are how that number is stored in a file or sent over the internet, using 1 to 4 bytes: the euro sign is E2 82 AC. For plain English letters and digits the two are the same value. Use UTF-8 to hex for code, files and URLs, and Unicode to hex when you need the character number.

    How do I convert text to hex with spaces?

    Spaces are the default: every byte is shown as two hex digits followed by a space, such as 48 65 6C 6C 6F. Choose "no spaces" in the Format menu for one continuous string (48656C6C6F), or "0x48, 0x69" for a comma-separated list.

    Is ASCII to hex the same as text to hex?

    For English letters, digits and common symbols, yes. ASCII covers 128 characters, hex 00 to 7F, and UTF-8 stores them as exactly the same bytes. Characters outside ASCII, such as é, € or emoji, have no ASCII code, so they are converted as 2 to 4 UTF-8 bytes instead.

    How do I convert an emoji to hex?

    Paste the emoji and look at the character breakdown table. It shows the code point (for example U+1F600 for the grinning face), the UTF-8 bytes (F0 9F 98 80) and the HTML entity (😀). Some emoji, such as flags and family emoji, are made of several code points joined together.

    Is text to hex the same as a hex color code?

    No. A hex color such as #0F9D6B describes a color with three pairs of hex digits for red, green and blue. Converting text to hex encodes the characters themselves. Turning a word into hex does not give you a meaningful color.

    Is my text uploaded anywhere?

    No. The conversion happens in your browser on your own device. Your text is never sent to PickZeal or anyone else, so it is safe to convert passwords, keys and private messages.

    More text and code tools

    View all tools