hex --convert
Encoding converter
Text, hex, Base64, binary, URL encoding and escaped strings are different spellings of the same bytes. Pick two and convert in either direction. Nothing leaves your browser.
Type, paste or drop a small file.
The converted bytes appear here.
The formats
| Format | Example | Also accepted as input |
|---|---|---|
| Text (UTF-8) | Hi ✓ | Any text. Characters outside ASCII take two to four bytes. |
| Hex | 48 69 20 e2 9c 93 | 4869, 48:69, 0x48, 0x69, \x48\x69, upper or lower case |
| Base64 | SGkg4pyT | With or without = padding, line breaks, the URL-safe alphabet |
| Base64 URL-safe | SGkg4pyT | Uses - and _ instead of + and /, no padding. Used in JWTs. |
| Binary | 01001000 01101001 | Eight bits per byte, spaces optional, 0b prefix |
| Decimal bytes | 72 105 | Numbers from 0 to 255, separated by spaces or commas |
| URL encoding | Hi%20%E2%9C%93 | Unescaped characters are kept. A + stays a plus. |
| Escaped string | Hi \xe2\x9c\x93 | \n \t \r \0 \\, \xNN, \uNNNN, \u{…}, octal \101 |