Text to Hex Converter
Convert any text to its hex byte representation instantly. Free, private — nothing is uploaded.
Your text converted to hex will appear here.Related tools
Why use PixelTools' text to hex converter
Live encode and decode
The result updates instantly as you type — no button to click, no page reload.
One-click swap
Swap the output back into the input and flip the mode to check your work or reverse a conversion.
Full UTF-8 support
Emoji, accented letters, and non-Latin scripts encode and decode correctly, byte for byte.
Lenient hex parsing
Paste hex with spaces, commas, or 0x prefixes — they're stripped automatically before decoding.
100% private
Runs entirely in your browser. Nothing you type or paste is uploaded or stored.
Copy or download
Grab the result to your clipboard, or download it as a .txt file.
Three steps to use the text to hex converter
- 1
Type or paste your text
Enter any text — letters, numbers, punctuation, emoji, or accented characters.
- 2
Read the result instantly
Your text converts to lowercase, space-separated hex byte pairs as you type.
- 3
Copy, download, or swap direction
Grab the result with one click, download it as a .txt file, or hit swap to convert it right back and check your work.
Who converts text to hex?
Developers writing byte-array literals, testing a network protocol payload, or generating a hex color/config value from a plain string all need the exact byte representation of some text.
Debugging byte data
Turn a raw byte dump from a debugger, memory inspector, or crash log back into readable text in seconds.
Inspecting network payloads
Decode hex-encoded bytes from a packet capture or API payload without installing a CLI tool.
Writing byte-array literals
Generate the exact hex byte sequence for a string you need to embed as a byte array or test payload.
Learning encoding basics
See exactly how text maps to bytes and hex — a common early topic in CS and networking courses.
Frequently asked questions
I need a byte array for C, Python, or another language — does the output work directly?
+
The output is a space-separated list of lowercase byte pairs (e.g. 68 65 6c 6c 6f), which most languages need reformatted slightly — for example prefixing each pair with \x in Python or 0x and commas in C. Copy the raw hex and adjust the punctuation for your language's byte-array syntax.
Will special characters and emoji encode correctly?
+
Yes — every character is encoded through its full UTF-8 byte sequence, so accented letters and emoji become multiple hex pairs rather than one truncated or incorrect byte, unlike a naive ASCII-only encoder.
What is hexadecimal (hex)?
+
Hexadecimal is base 16 — it uses the digits 0-9 plus the letters a-f to represent a value, so every byte (0-255) fits in exactly two hex digits. It's the standard way to display raw byte data because it's far more compact than binary and easier to read in fixed-width pairs.
Is my text or hex data uploaded anywhere?
+
No. Everything runs entirely in your browser using JavaScript — nothing you type or paste is sent to a server.
Does this handle emoji and non-English text?
+
Yes. Text is encoded as UTF-8 bytes before converting to hex, so accented letters, CJK characters, and emoji all round-trip correctly — multi-byte characters just take up more than one hex pair, exactly as they do on disk or over the network.
Why do I get an error when I paste my hex?
+
The most common cause is an odd number of hex digits (each byte needs exactly two) or a stray non-hex character. This tool strips spaces, commas, and 0x prefixes automatically, but it can't guess a truncated or corrupted byte.
Need a different conversion?
Text to Hex Converter now
Free, instant, no account needed.
Start converting →