Skip to content

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

Options
0 chars · 0 lines
The result will appear here.

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?

  1. Type or paste your text; the hex bytes appear instantly.
  2. Choose the format: spaces, none, comma, colon, 0x prefixes, C-array or \x escapes.
  3. 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:

Input
Héllo 😀
Output
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.

More tools in Encoding & Decoding →