ToolWren logo ToolWren
ToolWrenEncoding › Hex

Hex ⇄ Text Converter

Convert readable text into a hexadecimal byte string, or decode hex back into text. Useful for debugging encodings, protocols and binary data.

100% client-side · nothing is uploaded

Loading tool…

Quick answer

Hex is a free, private online tool that lets you convert text to hexadecimal bytes or hex back to text. It runs entirely in your browser, so nothing you enter is uploaded to a server.

How to use the Hex

  1. Choose the mode you need with the Encode / Decode toggle at the top of the tool.
  2. Type or paste your text into the Input box — the result appears instantly as you type.
  3. Use Swap (⇅) to move the output back into the input and flip the mode, which is handy for round-trips.
  4. Click Copy to copy the result, or Clear to start over.

Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.

About Hex

What is hexadecimal?

Hexadecimal is base-16, using digits 0–9 and letters a–f. One byte (8 bits) is exactly two hex digits (00–ff), which makes hex a compact, readable way to show raw bytes.

Text ↔ hex

Encoding converts each character to its UTF-8 byte(s) and prints them as two-digit hex. Decoding reverses the process. Spaces, 0x prefixes and newlines in the input are ignored when decoding.

Common uses

Inspecting file signatures (magic numbers), debugging network packets, reading memory dumps, and working with color codes, hashes and binary protocols.

Frequently asked questions

Why must hex have an even number of digits?
Each byte is two hex digits, so an odd count means an incomplete byte. The decoder will flag this.
Does it support spaces and 0x prefixes?
Yes. The decoder strips spaces, newlines and 0x prefixes automatically, so many formats just work.
Is Unicode supported?
Yes — text is encoded as UTF-8, so multibyte characters and emoji round-trip correctly.

Understanding Hex in depth

What hexadecimal is

Hexadecimal is a base-16 number system using the digits 0–9 and the letters a–f to represent values ten to fifteen. Its key property is that one byte (eight bits) is exactly two hex digits, from 00 to ff. That clean two-digits-per-byte mapping makes hex the standard, compact way to display raw binary data that would be unreadable as actual bytes.

How text becomes hex

To convert text to hex, the tool first encodes each character as its UTF-8 bytes, then prints each byte as a two-digit hexadecimal number. So 'A' (byte 65) becomes 41, and an emoji becomes four hex pairs. Decoding reverses this: pairs of hex digits are parsed back into bytes and the bytes are interpreted as UTF-8 text. Spaces, newlines and 0x prefixes in the input are ignored so many formats just work.

Where developers use hex

Hex is everywhere low-level work happens: file signatures (a PNG begins 89 50 4e 47), memory and hex-dump viewers, network packet inspection, color codes (#ff8800), cryptographic keys and hashes, character code points (U+1F600), and machine code. Whenever you need to see what bytes are really there, you read them in hex.

Why an even number of digits matters

Because each byte is two hex digits, a valid hex string must have an even length. An odd count means an incomplete byte, so this tool flags it rather than guessing. It also tolerates common formatting — interspersed spaces, line breaks and 0x prefixes are stripped automatically before decoding.

Hex, binary and decimal

Hex, binary and decimal are just different notations for the same numbers. Binary shows every bit (great for bit-level logic) but is long; decimal is human-natural but does not align with byte boundaries; hex is the practical compromise that maps neatly onto bytes. For converting between the bases of whole numbers, see the Number Base Converter; this tool focuses on turning text and byte data to and from hex.

Related & complementary tools

More Encoding tools