Encoding tools / Hex

Hex Encoding & Decoding

Convert UTF-8 text to or from hexadecimal notation locally in your browser.

01

Hex Decoding

Convert Hex text back to UTF-8 text.

DECODE
  1. Paste encoded text
  2. Decode bytes
  3. Copy text
0 characters
Ready to decode?Whitespace between encoded characters is ignored during decoding.
02

Hex Encoding

Convert UTF-8 text to Hex text.

ENCODE
0 characters
Ready to encode?Text is encoded as UTF-8 before it is converted to Hex.
Encoding guide

Hexadecimal encoding and decoding guide

Learn how hexadecimal represents bytes, why it appears in cryptography, and how it differs from encryption.

Hexadecimal, often shortened to hex, is a base-16 notation that represents each byte with two characters from 0–9 and A–F. Developers use it to display binary values such as hashes, keys, identifiers, and ciphertext because it is predictable and easy to inspect. Hex is an encoding, not encryption: it provides no secrecy and can be converted back to the original bytes by anyone who has the string.

When encoding text in this workspace, each UTF-8 byte is converted into a pair of hexadecimal digits. Decoding reverses that representation back to text. The input must contain valid pairs of hexadecimal characters; a missing digit or a pasted prefix such as 0x can make another system reject the value. Uppercase and lowercase hex normally represent the same byte, but surrounding whitespace and the intended character encoding can still affect compatibility.

Hex is especially common in cryptographic documentation because binary output cannot always be copied safely. For example, a SHA-256 digest is often displayed as 64 hex characters, while an AES ciphertext might be transported as either hex or Base64. Always record which representation a system expects. If you need confidentiality, encrypt the original bytes before converting them to hex; if you need authenticity, use an HMAC or digital signature. A readable hex string is still data that deserves appropriate handling.

How it works

A careful workflow

  1. Use two hexadecimal characters for every byte of input.
  2. Remove prefixes, separators, and whitespace unless the receiving system explicitly permits them.
  3. Document whether a value is raw text, Hex, or Base64 before passing it to a cryptographic tool.
Common questions

FAQ

Is hexadecimal encrypted?

No. Hex is a reversible display format for bytes.

Why must hex have an even number of characters?

Each byte is represented by two hexadecimal digits.

Should I use Hex or Base64?

Hex is easy to inspect but larger; Base64 is more compact for transport. Use the format required by the receiving system.