Hex Decoder

Convert between hexadecimal and text instantly. Supports configurable delimiters and prefixes. All processing in your browser.

Instant Conversion Configurable Output Client-Side Processing

Settings

How to Use Hex Decoder

1

Choose direction

Select Hex to Text or Text to Hex conversion mode.

2

Enter input

Paste hex string or regular text depending on the selected mode.

3

Configure and convert

Adjust delimiter and prefix settings, then copy the result.

What is Hexadecimal?

Hexadecimal (base-16) is a number system using digits 0-9 and letters A-F. In computing, hex is commonly used to represent binary data, byte values, memory addresses, and color codes. Each hex byte (two hex digits) represents one byte (8 bits) of data.

Common Uses

Color Codes

CSS colors like #FF5733 represent RGB values in hex

Binary Data

Representing raw bytes in a readable format

Memory Addresses

Address locations in computer memory

Hex to ASCII Quick Reference

The most frequently needed ASCII values when reading or writing hex. Printable ASCII runs from 0x20 (space) to 0x7E (tilde); bytes below 0x20 are control characters.

Character Hex Decimal Meaning
NUL 0x00 0 Null byte — string terminator in C
TAB 0x09 9 Horizontal tab
LF 0x0A 10 Line feed (\n)
CR 0x0D 13 Carriage return (\r)
(space) 0x20 32 Space
0–9 0x30–0x39 48–57 Digits 0 through 9
A–Z 0x41–0x5A 65–90 Uppercase A through Z
a–z 0x61–0x7A 97–122 Lowercase a through z
DEL 0x7F 127 Delete control character

The pattern worth memorizing: digits start at 0x30, uppercase letters at 0x41, lowercase at 0x61 — exactly 0x20 above uppercase. That is why setting bit 0x20 flips the case of an ASCII letter.

Hex Prefixes Explained: 0x, \x, and #

The same hex byte appears with different prefixes depending on where you find it. All three mean the same underlying value — the prefix is just a convention from the surrounding language:

0x

0x — programming literal

C, C++, Java, JavaScript, Python, and Go all write hex numbers with the 0x prefix: 0x1F, 0xFF, 0xDEADBEEF. Memory addresses and byte values in documentation and hex dumps almost always use 0x.

\x

\x — string escape

Inside strings and regex patterns, \xNN means the byte with value NN: "\x48\x65\x6C\x6C\x6F" is "Hello". Python and JavaScript also support \uXXXX for Unicode code points (4 hex digits) — see the Unicode Decoder for that format.

#

# — colors

CSS and design tools write RGB colors as #RRGGBB: #FF5733 is rgb(255, 87, 51). Each pair of hex digits is one channel byte. URLs use a different convention — %XX percent-encoding — handled by the URL decoder.

Frequently Asked Questions

What delimiter formats are supported?

You can choose between space (48 65 6C 6C 6F), colon (48:65:6C:6C:6F), or no delimiter (48656C6C6F). The decoder auto-detects the format.

Does it handle UTF-8 text?

Yes. The tool properly encodes and decodes UTF-8 multi-byte characters, converting each byte to its hex representation.

Can I use the 0x prefix?

Yes. You can toggle the output prefix between 0x, \x, #, or none. The decoder also accepts input with any of these prefixes.

What do the 0x, \x, and # prefixes mean?

They are conventions from different languages, all representing the same hex values. 0x is a numeric literal prefix in C, Java, JavaScript, and Python (0xFF). \x is a string escape for a single byte ("\x41" is "A"). # is used for RGB colors in CSS (#FF5733).

How do I read a hex dump?

A hex dump shows each byte as two hex digits, usually 16 bytes per line, often with the offset (address) on the left and the ASCII rendering on the right. Dots in the ASCII column mean non-printable bytes. Practicing with "Hello" is a good start: 48 65 6C 6C 6F — H is 0x48, e is 0x65, each l is 0x6C, o is 0x6F.

How do I convert hex to decimal or binary?

Each hex digit maps to exactly 4 bits: F = 1111, so FF = 11111111 = 255. For decimal, multiply by powers of 16 position by position: 1F = 1x16 + 15 = 31. This tool shows the decimal value of each byte, and for multi-byte sequences it displays the UTF-8 text those bytes decode to.

Where is hex actually used?

Almost everywhere binary meets humans: color codes (#FF6600), MAC addresses (00:1A:2B:3C:4D:5E), memory addresses, SHA-256 hashes, file magic bytes (a gzip stream always starts with 1F 8B), and Intel HEX firmware files. Hex fits binary naturally because one byte is always exactly two hex digits.

Why does hexadecimal use the letters A-F?

Base 16 needs 16 digit symbols, but Arabic numerals provide only 10, so the values 10-15 borrow the letters A-F (case-insensitive by convention). The name combines hexa (six) and decimal (ten). The A=10 through F=15 mapping is universal across computing - there is no competing variant.

{-- * External Resources Component(#18 Phase 3b 内容佐证工程) * 工具页「权威引用」区块:RFC / W3C / WHATWG / ECMA / IANA / 官方规范站 / Wikipedia。 * * - 接受 :slug 属性 → 经 config/tool-sources.php 家族矩阵渲染该工具的权威引用 * - slug 未命中映射时不渲染(无权威来源的工具静默跳过) * - 链接 title 保持英文(引用源专名);description 经 * common.resources.descriptions.{key} 本地化,lang 未命中回退英文(线上不裸奔) * - 链接保持 dofollow(rel="noopener noreferrer") * * @param string|null $slug --}}