Text to Hex Converter
See the exact bytes behind any text, from a quick "Hello" to emoji, formatted the way your code or debugger expects.
Processed locally in your browser· Your data stays in your browser.
What is Text to Hex Converter?
Hexadecimal writes each byte as two digits from 0–9 and a–f, so one byte such as 72 becomes "48". Developers use it to read network dumps, craft test payloads, compare checksums and understand how characters are stored.
This converter first turns your text into UTF-8 bytes, so "é" becomes c3 a9 and "😀" becomes f0 9f 98 80. You can output plain pairs, colon or comma lists, 0x-prefixed values for C or JavaScript arrays, or \x escapes for string literals.
How does it work?
- Type or paste your text; the hex bytes appear instantly.
- Choose the format: spaces, none, comma, colon, 0x prefixes, C-array or \x escapes.
- Tick uppercase if you prefer A–F, then copy the result or press Swap to convert hex back to text.
Common use cases
- Writing a byte array literal (0x48, 0x65, …) for C, C#, Go or an Arduino sketch.
- Building a \x-escaped string as a protocol test fixture.
- Checking why a text field is longer in bytes than in characters.
- Comparing the raw bytes of two strings that look identical but differ in accents.
Examples
Try this input in the tool above:
Héllo 😀
48 c3 a9 6c 6c 6f 20 f0 9f 98 80
Privacy
Text to Hex Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
The output is the UTF-8 encoding. Other encodings (UTF-16, Latin-1) produce different bytes for non-ASCII characters.
Frequently asked questions
Why does "é" give two bytes?
UTF-8 stores characters above U+007F in 2 to 4 bytes. "é" (U+00E9) is c3 a9. Plain ASCII letters stay one byte each.
Is this the same as the decimal code of a character?
No. Hex here shows bytes (base 16). For Unicode code points in decimal, use Text to Decimal; for byte values in base 10, use Text to ASCII.
Which separator should I pick?
Space for readability, none for compact strings, 0x with commas for source-code arrays, and \x for string escapes.
Related tools
Hex to Text Converter
Paste hex bytes from a dump, a log or a source file and read the text they spell.
Encoding & Decoding
Text to Binary Converter
Turn words into ones and zeros: each byte of your text is shown as eight bits.
Encoding & Decoding
Text to ASCII Converter
List the ASCII / byte code of every character, for example "Hi" → 72 105.
Encoding & Decoding
Base64 Encoder
Convert any text, including emoji and accented characters, into a Base64 string in one click.
Encoding & Decoding
Hex Viewer
Drop a file to see its raw bytes in the familiar offset | hex | ASCII layout, plus its detected type and size.
File Tools
Text to Decimal Converter
Get the Unicode number of every character: "é" is 233, "世" is 19990 and 😀 is 128512.
Encoding & Decoding
Text to Octal Converter
Write your text as base-8 byte values, for example "Hi" → 110 151, or as \110\151 escapes.
Encoding & Decoding
UTF-8 Byte Viewer
Paste text to see how many bytes each character takes and what those bytes are, in UTF-8 or, if you prefer, UTF-16 and UTF-32.
Encoding & Decoding