Convert between text and hexadecimal (base-16) codes.
Enter text to get its hex representation (two hex digits per character), or enter hex codes to decode back to readable text.
Supports 0x-prefixed, space-separated, concatenated, and %-encoded hex formats.
This tool processes all data locally in your browser — no data is uploaded to any server.
Input
Encoding:Auto-detect▾
Auto-detect
UTF-8
UTF-16 LE
UTF-16 BE
ISO-8859-1 (Latin-1)
Windows-1252
GBK / GB2312
Shift-JIS
EUC-JP
EUC-KR
Big5
Case:Prefix:Separator:
Type to convert in real-time
Output
(UTF-8 .txt)
Scheme 14: Hexadecimal Encoding
Hexadecimal (base-16) is a compact way to represent binary data. Each hex digit represents 4 bits (a nibble),
so two hex digits represent exactly one byte (8 bits). Hex is widely used in programming,
debugging, color codes (e.g. #FF5733), memory addresses, and URL encoding (e.g. %20 for space).
Common hex prefixes include 0x (C, JavaScript), $ (Pascal, assembly), and 0x/0X (hex literals).
Why hexadecimal?
One hex digit encodes exactly 4 bits — a nibble — so a byte is always two hex digits and the mapping to binary is mechanical. That 1:1 alignment, plus brevity, is why memory addresses, color codes like #FF8000, and hash digests are written in hex by convention.
Whether 0xFF means 255 or −1 depends on the width and signedness you assume — hex alone does not carry that context.