A single word
"Code" converts to 43 6f 64 65 — a capital C is 43 and the lowercase letters fall in the 61–7a range.
Text to hex converter — turn any string into hexadecimal bytes (UTF-8), free online.
About
Type or paste any text and see the exact bytes it's stored as, written in hexadecimal. Each byte becomes a two-digit hex value from 00 to ff, so you can compare strings byte for byte, spot hidden whitespace or invisible characters, or copy the hex straight into code, a packet or a hex editor.
A byte holds a value from 0 to 255, which in hexadecimal is exactly two digits, 00 to ff — that's why hex editors, network tools and debuggers all show raw data in hex. Seeing text as hex answers questions the text itself hides: is that a normal space (20) or a non-breaking space (c2 a0)? Does the line end in a Unix newline (0a) or a Windows one (0d 0a)? Is there a byte order mark (ef bb bf) at the start? Plain English characters match the classic ASCII table — A is 41, a is 61 — while everything else is encoded as UTF-8, the encoding used by the web.
Examples
4 worked examples
"Code" converts to 43 6f 64 65 — a capital C is 43 and the lowercase letters fall in the 61–7a range.
"A B" converts to 41 20 42 — the space in the middle is the byte 20.
"ñ" converts to c3 b1 — two bytes, because UTF-8 needs more than one byte for anything outside basic ASCII.
The text "2026" converts to 32 30 32 36 — the characters 0–9 are bytes 30–39, not the numbers themselves.
FAQ
Quick answers to common questions about the Text to Hex Converter.
Type your text above and click "Convert to hex". The text is encoded as UTF-8 and every byte is shown as a two-digit hexadecimal value, all inside your browser.
48 65 6c 6c 6f — one byte each for H, e, l, l and o.
Lowercase, for example 6c rather than 6C. Hex digits are case-insensitive, so either form means the same value, and the Hex to text side accepts both.
The output is always space-separated two-digit bytes. To remove the spaces, paste the result into any find-and-replace; going the other way, the hex to text converter accepts unspaced hex and 0x or \x prefixes.
Characters outside basic ASCII need more than one byte in UTF-8. é is c3 a9, € is e2 82 ac and most emoji take four bytes, so the hex output can be longer than the text.
No. Text to hex encodes characters into their byte values. If you have a number, like 255, and want its hex form (ff), use the decimal to hex converter instead.
Yes. Hex encoding and Base16 both mean writing each byte as two hexadecimal digits, which is exactly what this converter produces, just with a space between bytes for readability.
Yes. Every character is encoded, including invisible ones: a space is 20, a tab is 09 and a new line is 0a, which makes it easy to find stray whitespace.
No. The conversion runs entirely on your device, and nothing you type is sent to a server. It's free, with no sign-up and no limit on use.
Did Text to Hex Converter work for you?