Tools/Hex Encoder

Hex Encoder / Decoder

Convert text to hexadecimal and back. UTF-8 aware. Accepts 0x, \x, spaced, or continuous hex on decode.

All processing happens in your browser — nothing is sent to our servers

What is hex encoding?

Hexadecimal (base 16) represents each byte as two characters from 0-9 and a-f. It is the standard way to display hashes, encryption keys, binary payloads, and raw memory. Like Base64, hex is encoding — not encryption — and provides no confidentiality.

How it works
Hexadecimal Encode / Decode
Encode
01Input text

Text converted to UTF-8 bytes — any Unicode, including emoji and accented characters

→
02Byte values

Each byte read as an integer from 0 to 255

→
03Base-16 map

Every byte rendered as two hex digits (0–9, a–f) — high nibble then low nibble

→
04Format

Digits joined continuously or separated by spaces; optionally upper-cased

→
05Hex output

Two characters per byte — the standard representation for hashes, keys, and binary payloads

Decode
01Hex string

Input normalised — 0x and \x prefixes, spaces, commas, and line breaks stripped

→
02Validate

Remaining characters must be 0–9a–f and form an even number of digits (two per byte)

→
03Parse pairs

Each pair of hex digits parsed back into a single 0–255 byte

→
04UTF-8 decode

Bytes interpreted as UTF-8 text to reconstruct the original string

Spec: Base-16 encoding (RFC 4648 §8)

Frequently Asked Questions