How to use
- Type text on the left to get its bytes on the right, or paste hex on the right to decode it.
- Choose the separator, and whether to add 0x prefixes or use upper case.
- Switch the base to decimal, octal or binary if you need another notation.
- Copy either side.
Options explained
- Separator
- Space gives 48 65 6c 6c 6f, None gives 48656c6c6f and Comma gives 48, 65, 6c, 6c, 6f — handy for code arrays.
- 0x prefix
- Writes each byte as 0x48, the notation used in C, JavaScript and many other languages.
Examples
| Text | Hex (UTF-8) |
|---|---|
| Hello | 48 65 6c 6c 6f |
| é | c3 a9 |
| 中 | e4 b8 ad |
Frequently asked questions
Which character encoding is used?
UTF-8, the standard for the web. ASCII characters take one byte each; accented letters take two, Chinese characters three, and emoji four.
What happens with hex that is not valid UTF-8?
The readable parts are decoded and invalid sequences are shown as the replacement character �, with a warning.
Is my text uploaded?
No. Conversion runs in your browser.
Privacy
This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.