String to Hex
Type or paste a string and convert it into hexadecimal UTF-8 bytes instantly. Use separators that fit code samples, payloads, or documentation.
Last updated: May 30, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is String to Hex?
String to hex conversion shows the byte-level hexadecimal representation of text. The input string is encoded as UTF-8 bytes, then each byte is written as two hex digits from 00 to FF. For ordinary ASCII text, each character becomes one byte. For Unicode text, accented letters and emoji may use multiple bytes.
Developers use string-to-hex conversion when documenting binary payloads, preparing protocol examples, debugging encoded data, checking UTF-8 byte sequences, and creating test fixtures where raw bytes are easier to read in hexadecimal than in binary.
How to Use String to Hex
Type or paste the string you want to encode
Choose a separator: space, comma, or newline
Review the generated hexadecimal byte values
Copy the hex output or download it as a text file
Use Hex to String or Hex to UTF8 to decode the bytes back
Common Use Cases
- Encoding short text payloads as hex byte lists for protocol documentation.
- Checking the UTF-8 byte sequence for accented characters, symbols, or emoji.
- Creating test fixtures for parsers that consume hexadecimal byte input.
- Preparing CTF or puzzle strings where a message is hidden in hex.
- Verifying that a hex decoder recovers the original string exactly.
Example Input and Output
The string WebTools is encoded as one two-digit hex value per UTF-8 byte.
WebTools57 65 62 54 6F 6F 6C 73Privacy
String-to-hex encoding is fully client-side. Your text is not sent to a server.
Two digits per byte
Hexadecimal is base 16, so every byte from 0 to 255 is represented by exactly two digits from 00 to FF.
Frequently Asked Questions
Does this encode text as ASCII or UTF-8?
The tool uses UTF-8. ASCII characters produce the same byte values as ASCII, while Unicode characters may produce multiple bytes.
Why does an emoji produce several hex bytes?
UTF-8 uses multiple bytes for characters outside the basic ASCII range. Emoji commonly use four bytes.
Can I choose separators between bytes?
Yes. Use spaces, commas, or newlines depending on whether you need readable text, list-style output, or one byte per line.
How do I decode the output?
Paste the generated bytes into the Hex to String or Hex to UTF8 tool to recover the original text.
Is my string uploaded?
No. Encoding happens locally in your browser and the input stays on your device.
Related Tools
Hex to String
Decode hexadecimal byte values into readable strings. Supports compact hex, spaced bytes, UTF-8 text, and Latin-1 byte mode.
Hex to UTF8
Decode hexadecimal byte values as UTF-8 text. Supports compact hex, spaced bytes, and 0x-prefixed values.
String to Binary Converter
Convert strings into UTF-8 binary byte groups. Choose spaces, commas, or newlines between bytes and copy the binary output.
Text to ASCII Converter
Convert any text string to its ASCII codes in decimal, hexadecimal, octal, or binary. See the numeric value for every character in your text.
Code to ASCII Converter
Convert numeric character codes to ASCII text. Supports decimal, hex, binary, and octal code lists with validation.
Number Base Converter
Convert numbers between binary, decimal, hexadecimal, octal, and any custom base — with bit grouping, signed integers, and step-by-step explanation.

