Text to Hex Converter

Convert text to hexadecimal and hex back to text, with correct UTF-8 so emoji an...

SecureFastFree

Updated

Text input

Hex output

48 69

Live counts

2
Characters
2
UTF-8 bytes
4
Hex digits

Character breakdown

H
48
72
i
69
105

Common characters in hex

CharacterDecimalHexWith 0x
A65410x41
Z905A0x5A
a97610x61
z1227A0x7A
048300x30
957390x39
space32200x20
!33210x21

Quick answer

To convert text to hex, type your text into the box and read the hexadecimal on the right. Each character is encoded as its UTF-8 bytes, and every byte becomes two hex digits, so the letter A is 41 and Hi is 48 69. Switch to Hex to Text and paste byte pairs (with or without spaces or 0x prefixes) to decode them back. Because it uses real UTF-8 bytes, emoji and accented letters like é (c3 a9) round-trip exactly. Everything runs in your browser, so no text is ever uploaded.

SSL Secured
256-bit Encryption
Cloud Processing
Mobile Friendly

Converter Features

Two-Way Live Convert - Text to hex and hex to text with an instant swap
UTF-8 Round-Trip - Emoji and accents encode and decode back exactly
0x Prefix Toggle - Write bytes as 0x48 for pasting into code
Uppercase or Lowercase - Switch between ff and FF with one click
Separator and Grouping - Space, comma, newline, none, plus byte grouping
Copy and Download - One tap to clipboard or a text file

Why Use Text to Hex Converter?

Both Directions, Live

Type text to see its hex as you type, or paste hex to decode it straight back to text. One tool, either way, with a one-tap swap.

Correct UTF-8 Encoding

Text is encoded as real UTF-8 bytes, so emoji and accented letters like é round-trip exactly. Each byte becomes two hex digits, the way computers store it.

Your Format, Your Way

Choose a space, comma, newline, or no separator, switch between lowercase and uppercase, add a 0x prefix, and group bytes for a clean hex dump.

Friendly Error Checks

Paste an odd number of digits or a stray non-hex character and the decoder names the exact problem instead of guessing, so you fix bad hex in one read.

Live Byte and Digit Counts

See the character count, the UTF-8 byte count, and the total hex digit count update instantly, so you always know how big the output really is.

100% In Your Browser

Every conversion runs on your device in JavaScript. No text you type is ever uploaded, logged, or sent to a server, and it works offline.

Common Uses for Text to Hex

Debugging and Data Inspection

Read the exact byte pattern behind a string to diagnose encoding issues and hidden characters.

Programming and Protocols

Paste 0x-prefixed bytes straight into source, or verify an encoding while working on parsers.

Security and Cryptography

Prepare hex input for hashing and encryption workflows where every byte has to be exact.

Learning How Text Is Stored

See how a character becomes UTF-8 bytes and hex, the foundation of every encoding lesson.

How It Works

1

Pick a direction

Choose Text to Hex to encode, or Hex to Text to decode. The input and output panels relabel to match the direction you picked.

2

Type or paste your input

Enter text (emoji welcome) or paste hex. The result appears instantly. Optionally set the separator, case, 0x prefix, and byte grouping.

3

Copy or download

Press Copy to put the result on your clipboard, or Download to save it as a plain text file. Swap the panels to convert the result back again.

Tips and Best Practices

Two Hex Digits Per Byte

Read hex in pairs. Each pair of digits is one byte, so 48 69 is two bytes, which decode to the two letters Hi.

Separators Are Optional When Decoding

You can paste hex with spaces, commas, 0x prefixes, or as one long string. The decoder splits it into byte pairs either way, so 4869 also decodes to Hi.

Emoji Take More Than One Byte

In UTF-8 an emoji is four bytes, which is eight hex digits, so it shows as four pairs. That is correct, not a bug, and it decodes back to the same emoji.

Frequently Asked Questions

Type or paste your text into the input box with Text to Hex selected, and the hexadecimal appears instantly on the right. Each character is encoded as its UTF-8 bytes, and every byte is shown as two hex digits. For example, the letter A is 41 and the word Hi is 48 69. You can pick the separator, choose uppercase or lowercase, add a 0x prefix, then copy the result or download it as a text file.
Switch to Hex to Text, then paste your hex. Every two hex digits become one byte, so you can paste them spaced like 48 69, as one continuous string like 4869, comma separated, or with 0x prefixes like 0x48 0x69. The tool strips the formatting, decodes the bytes as UTF-8, and shows the readable text. Paste 48 69 and you get Hi back.
It encodes text as UTF-8 bytes rather than raw code points, which is how computers actually store text. A character outside plain ASCII becomes two, three, or four bytes, and each byte is two hex digits. Because the decoder reads those same UTF-8 bytes, an accented letter such as é converts to c3 a9 and back to é, and an emoji round-trips exactly.
The 0x prefix marks a value as hexadecimal in languages like C, JavaScript, Python, and Go. Turn it on and each byte is written as 0x48 0x69 instead of 48 69, which is handy when you are pasting bytes straight into source code. When decoding, the tool accepts 0x prefixes automatically, so you never have to strip them by hand.
When encoding you can separate bytes with a space (48 69), a comma (48, 69), a newline, or no separator at all (4869). You can also group bytes into blocks of 2, 4, or 8 for a hex-dump look. When decoding, separators are optional because the tool splits the digits into byte pairs for you.
The decoder checks two things. If it finds any character that is not 0-9 or A-F, it names the stray character. If the number of digits is odd, it tells you a digit is unpaired, because every byte needs exactly two digits. That way you fix the exact issue instead of getting a wrong or empty result.
Both mean the same value, so it is a style choice. Lowercase (ff) is common in web colors, hashes, and many command-line tools, while uppercase (FF) is common in documentation and some C code. This converter lets you switch between them with one click, and the decoder reads either case.
Yes. This converter runs entirely in your browser using JavaScript, so nothing you type is uploaded, stored, or sent to any server. It keeps working with the network off, which makes it safe for sensitive text.

Related Tools