Text → hex
- Input
- Oi
- Expected output
- 4f 69
Two digits per character.
text to hex converter
Hexadecimal (base 16) is the most common way to represent bytes compactly and legibly, each text character becomes two hex digits, from "00" up to something longer for extended code points.
Two digits per character.
0x prefix is optional.
Select the Binary format, keep the direction on Text → Code and type your text. Each character becomes an 8-bit group (for example, 'A' becomes 01000001), separated by spaces. For the reverse, paste the binary and switch the direction to Code → Text, it works with space-separated groups or with one continuous run of bits.
The result matches what `text.encode().hex()` would do in Python or `Buffer.from(text).toString('hex')` in Node.js for ASCII characters, shown with spaces between bytes for readability.
Yes, use the "Uppercase hex" option when encoding. Decoding accepts both cases automatically, with nothing to switch.
Each byte needs exactly two hex digits; an input with an odd character count in a single token raises a validation error instead of an incorrect result.
All translation happens in your browser. No text is ever sent to a server, safe for passwords, tokens and sensitive data.