Hex to Text Converter

Convert hexadecimal to text and text to hex online. Free hex encoder/decoder - works with ASCII, UTF-8, and Unicode.

๐Ÿ”’ Your text stays in your browser - nothing is sent to our servers
Text Input
Hex Output
How to Use

Three steps to get started

1

Choose direction

Select "Text โ†’ Hex" to encode or "Hex โ†’ Text" to decode.

2

Paste or type

Enter your text or hex string. Each character maps to two hex digits.

3

Copy the result

Click Copy and use the hex or decoded text wherever you need it.

About This Tool

Convert between text and hexadecimal

Hexadecimal is a base-16 positional number system that represents values using the sixteen digits 0โ€“9 and Aโ€“F. It is the standard shorthand for binary data because 16 is a power of 2: each hex digit maps to exactly four bits, so one 8-bit byte is always precisely two hex digits. That fixed width is why a 256-bit SHA-256 hash is always 64 hex characters, and why an RGB color like #1A5CFF is exactly six.

This converter works both ways:

  • Text โ†’ Hex: takes each character's code point and writes it as two hex digits, so Hi becomes 48 69
  • Hex โ†’ Text: reads digit pairs back into characters, ignoring case and any separators, so 48 65 6c 6c 6f and 48656C6C6F both decode to Hello

Reading hex in the wild

Hex dumps are how you identify a file whose extension lies. The first bytes of a file - its magic number - are a fingerprint: 89 50 4E 47 is a PNG, FF D8 FF is a JPEG, 25 50 44 46 spells%PDF, and 50 4B 03 04 means a ZIP container, which is also what you see at the start of a DOCX or XLSX. Network engineers use the same skill reading Wireshark packet panes, where the hex column sits beside the ASCII column for exactly this reason.

A few conventions to recognize. 0x is the C-family prefix for a hex literal (0x41), &h serves the same role in older BASIC dialects, and assembly often writes a trailing h as 41h. CSS drops the prefix entirely in favor of #. All of them describe the same value: decimal 65, the letter A.

The most common gotcha is assuming hex is encryption. It is not - hex is a reversible representation with no key, so anyone can decode it in seconds. It also doubles the size of your data, which is why Base64 (about 1.33ร— overhead) wins for transporting binary in email or JSON, while hex wins wherever a human has to read individual bytes.

Encoding and decoding both run as plain JavaScript in this page. Nothing is transmitted, so pasting a token or a memory dump here does not expose it.

FAQ

Frequently Asked Questions

Related Tools