encode | decode | compress

> hexadecimal | base16 | 0xFF <

// Hexadecimal - Convert between text and hex (base 16) representation

[UNIVERSAL]

Wide Usage

Used in programming, color codes, memory addresses, and debugging.

[READABLE]

Human Readable

Compact representation that's easier to read than binary.

[FLEXIBLE]

Format Options

Support for spaces, uppercase/lowercase, and various formats.

>> technical info

How Hexadecimal Works:

Hexadecimal (base 16) uses 16 symbols: 0-9 and A-F. Each hex digit represents 4 bits (half a byte). Two hex digits represent one byte (8 bits), making it perfect for representing binary data.

Examples:

'A' → 41 'Hello' → 48 65 6C 6C 6F 255 → FF

Why Use Hexadecimal:

  • >Color codes (#FF0000)
  • >Memory addresses
  • >Binary data debugging
  • >Character encoding
  • >Cryptographic hashes

>> frequently asked questions

What is hexadecimal?

Hexadecimal (hex) is a base-16 number system using digits 0-9 and letters A-F. It's commonly used in computing to represent binary data in a more readable format.

Why use hexadecimal instead of decimal?

Hexadecimal aligns perfectly with binary - each hex digit represents exactly 4 bits. This makes it ideal for representing computer memory, colors, and binary data.

What's the difference between 0x and # prefix?

'0x' is used in programming languages to denote hex numbers (0xFF). '#' is commonly used for web colors (#FF0000). Both indicate hexadecimal notation.

How do I convert hex colors to RGB?

Hex colors use 6 digits: RRGGBB. Each pair represents Red, Green, and Blue values from 00 (0) to FF (255). For example, #FF0000 is RGB(255,0,0) - pure red.

How do I convert hex to text online?

Paste the hex string (e.g., 48 65 6C 6C 6F or 48656c6c6f) into the input field and click [FROM HEX]. The decoder accepts:
Continuous hex: 48656c6c6f
Space-separated: 48 65 6C 6C 6F
With 0x prefix: 0x48,0x65,0x6C
Mixed case: 48656C6C6f
Output is decoded as UTF-8 so multi-byte characters (Chinese, Japanese, emoji) round-trip correctly. For text → hex, type the text and press [TO HEX].

How do I encode text as hexadecimal in different languages?

JavaScript: [...new TextEncoder().encode('Hello')].map(b => b.toString(16).padStart(2, '0')).join('')48656c6c6f.
Python: 'Hello'.encode().hex()'48656c6c6f'. Reverse: bytes.fromhex(h).decode().
Go: hex.EncodeToString([]byte("Hello")). Reverse: hex.DecodeString(s).
PHP: bin2hex('Hello') / hex2bin($h).
Shell: printf 'Hello' | xxd -p / xxd -r -p.
Rust: hex::encode("Hello") (with the hex crate).

16 进制编码 / 16 进制解码 是什么?

16 进制(Hexadecimal、Base16)是一种用 0-9A-F 共 16 个字符表示数字的计数法。每 1 位十六进制对应 4 位二进制(1 nibble),每 2 位对应 1 字节。
16 进制编码:把任意文本或二进制字节流按字节转成两位 hex 字符串,便于在日志、网址、协议里传输。
16 进制解码:反向把 hex 字符串转回原始字节。UTF-8 中文字符 1 个对应 3 字节,即 6 位 hex,例如「好」→ E5 A5 BD。本工具自动识别大小写、忽略空格,并在解码失败时给出位置提示。

Tradutor hexadecimal para texto — como funciona?

Um tradutor de hexadecimal para texto (também chamado decodificador hex, em português conversor hexadecimal) converte sequências de dois dígitos hex em bytes, que são então decodificados como UTF-8. Exemplo: 4F 6C 61Ola. Para caracteres com acento (á, ã, ç, é), cada letra ocupa 2 bytes em UTF-8, então Olá vira 4F 6C C3 A1. Cole sua string hex (com ou sem espaços) no campo de entrada e clique em [FROM HEX].

Texto a hexadecimal — ¿cómo convertirlo?

Para convertir texto a hexadecimal (también escrito converter texto para hexa, código hexadecimal, traductor hexadecimal), cada carácter se codifica primero en UTF-8 y luego cada byte se representa con dos dígitos hex 0–F. Ejemplo: Hola48 6F 6C 61. Una ñ ocupa dos bytes (C3 B1) porque UTF-8 usa de 1 a 4 bytes según el carácter. Pega tu texto y pulsa [TO HEX]; elige la opción Add spaces si quieres un separador visible entre bytes.

Traduction hexadécimal en texte — comment faire ?

La traduction hexadécimal en texte (décodeur hex) prend une chaîne comme 42 6F 6E 6A 6F 75 72 et la recompose en octets UTF-8 → Bonjour. Pour un é (code point U+00E9), UTF-8 produit deux octets C3 A9. Notre outil accepte indifféremment 0x, virgules, espaces, sauts de ligne, et ignore les majuscules/minuscules. En cas d'erreur il pointe la position exacte de l'octet invalide.

16 進数 デコーダ(Hex decoder)の使い方は?

16 進数 デコーダは、48 65 6C 6C 6F のような 16 進文字列をバイト列に戻し、UTF-8 としてテキストに復号するツールです。日本語のように UTF-8 で 3 バイト使う文字(「あ」→ E3 81 82)も正しく復元できます。入力欄に貼り付けて [FROM HEX] を押すだけで処理はブラウザ内で完結します。逆方向(テキスト → 16 進数)は [TO HEX]、出力にスペースを入れるかどうかは Add spaces で切り替えられます。

Why are MAC addresses and MD5 / SHA hashes in hex?

Because hex is the most compact human-readable form for byte streams — 2 hex chars per byte vs. 8 for binary or 3 for decimal. A MAC address is 6 bytes → 00:1A:2B:3C:4D:5E (12 hex chars). MD5 is 16 bytes → 32 hex chars. SHA-256 is 32 bytes → 64 hex chars. Using Base64 would be shorter but breaks the easy byte-by-byte comparison that tools like diff, grep, and logs rely on.

What's the difference between hex, Base16, and hexadecimal?

They are the same encoding with different names:
Hex is the everyday programmer shorthand.
Hexadecimal is the mathematical name ("base 16").
Base16 is the formal name used in RFC 4648, which mandates uppercase letters and defines the strict canonical form.
Differences in practice: hex often accepts both cases and 0x prefixes; RFC 4648 Base16 requires pure uppercase with no separators. Our tool treats them interchangeably — use /base16/ for strict RFC 4648 Base16, or this page for convenience conversion.

Other Languages