Text ↔ Hex Converter
Type text to see its hex representation, or paste hex to decode back to readable text.
Reviewed by the ToolNestr Editorial Team — July 2026
How hex encoding works
Hex encoding converts each character into its numeric Unicode code point, then expresses that number in base-16 (hexadecimal). Each byte (8 bits) is represented by exactly two hex digits — for example, the ASCII character "A" (code point 65) becomes 0x41. The converter pads single-digit hex values with a leading zero to ensure every byte uses exactly two hex digits.
The converter supports both spaced format (48 65 6C 6C 6F) for readability and continuous format (48656C6C6F) for compactness. When decoding, it accepts both formats and can also strip common prefixes like "0x". Hex provides a human-readable bridge between binary (too verbose) and decimal (which does not align with byte boundaries).
Worked example
Hex use cases
Where hexadecimal is most commonly applied in practice.
Developer
Converts strings to hex for debugging network protocols, inspecting binary file headers, and working with low-level data formats.
Cybersecurity Analyst
Analyzes hex-encoded payloads, inspects raw packet data, and decodes hexadecimal strings found in malware and exploit code.
Reverse Engineer
Reads hex dumps of binary executables, decodes string literals in memory dumps, and converts hex to text for analysis.
CS Student
Learning about number bases, character encoding, and low-level data representation by converting text to and from hexadecimal.
| Character | Hex | Decimal |
|---|---|---|
| Space | 0x20 | 32 |
| A | 0x41 | 65 |
| a | 0x61 | 97 |
| 0 | 0x30 | 48 |
| Z | 0x5A | 90 |
| z | 0x7A | 122 |
How to use the Text ↔ Hex Converter
Choose direction and format
Toggle between Text→Hex or Hex→Text. Pick spaced or continuous output format.
Paste and convert
Paste your data and click Convert. The result appears instantly in the output area.
Copy the result
Copy the hex or decoded text to your clipboard with one click.
Tips for working with hexadecimal
Choose the right output format
Spaced format (48 65 6C) is best for readability and debugging. Continuous format (48656C) is better for copying into code or when you need a compact representation.
Hex is case-insensitive
Both uppercase (48 65 6C) and lowercase (48 65 6c) hex are accepted. The converter outputs uppercase by default for clarity.
Use hex for binary inspection
When debugging binary protocols or file formats, hex is much easier to read than raw binary. Each byte becomes exactly two hex digits, making patterns visible at a glance.
What is hexadecimal?
Hexadecimal (hex) is a base-16 number system that uses 16 digits: 0–9 and A–F. Each hex digit represents 4 bits (half a byte), so two hex digits represent one full byte (0–255). Hex provides a compact, human-readable way to represent binary data and is widely used in computing.
Why hex is used
Hex is used because it is a bridge between binary (too long for humans) and decimal (which does not align with byte boundaries). One byte is always two hex digits, making it easy to read memory dumps, color values, MAC addresses, and cryptographic hashes. Hex is far more compact than binary while preserving the exact byte values.
Hex vs binary
The number 255 in binary is 11111111 (8 digits). In hex, it is FF (2 digits). Hex is 4x more compact than binary, and the conversion between hex and binary is trivial — each hex digit maps to exactly 4 binary digits. This makes hex the preferred notation for displaying and working with raw byte values in tools like debuggers, hex editors, and network analyzers.
Applications in computing
Hex is used everywhere in computing: HTML/CSS color codes (#FF5733), memory addresses and dumps, MAC addresses (00:1A:2B:3C:4D:5E), IPv6 addresses, Unicode code points (U+0041), cryptographic hash digests (SHA-256), file signatures and magic bytes, assembly language, and low-level debugging.
Frequently asked questions
How does text-to-hex conversion work?
Each character is converted to its Unicode code point (charCode), then that number is expressed in base-16 (hexadecimal) padded to two digits. For example, "A" (65) becomes 41.
How do I convert hex back to text?
Paste hex digits separated by spaces (e.g. 48 65 6C 6C 6F) or as a continuous string and toggle to Hex→Text. Click Convert to decode.
What is hexadecimal used for?
Hex is used in color codes (#FF5733), memory dumps, networking (MAC addresses, IPv6), cryptography, debugging, and low-level programming where binary would be too long to read.
What is the difference between spaced and continuous format?
Spaced format (48 65 6C) is easier to read. Continuous format (48656C6C6F) is more compact. The converter handles both for input and lets you choose the output format.
Can it handle emojis and Unicode?
Yes. Unicode characters are converted using their full code point value. Emojis produce longer hex sequences representing their code point.
Is my data private?
Yes. Everything is processed in your browser — no data is uploaded to any server.
Why do I see "0x" prefixes in some hex representations?
The "0x" prefix is a common programming notation for hexadecimal values. The converter omits it for cleaner output, but it will parse hex with or without the prefix.
What does the byte count represent?
The byte count shows how many bytes (2-hex-digit pairs) your input consumes. Each ASCII character is 1 byte, while Unicode characters may use multiple bytes.
Can I convert hex without spaces?
Yes. The converter accepts continuous hex strings (e.g. 48656C6C6F) and automatically splits them into pairs during decoding.
What is hex vs binary?
Hex (base-16) is a more compact representation than binary (base-16 uses 2 digits per byte vs binary's 8 digits). Hex is easier for humans to read and write while still representing raw byte values.