Hex converter
Convert text to hexadecimal (hex) code and hex back to readable text. Handy for debugging, encoding and learning. Free online text to hex converter.
Convert between text and hexadecimal
Hexadecimal (base 16) uses the digits 0–9 and the letters A–F. It's the shorthand programmers use for bytes, because one byte always fits in exactly two hex digits. The letter A (character code 65) is 41 in hex, and "Hi" is 4869. This converter writes the bytes back to back with no spaces.
Choose To hex to turn text into hexadecimal codes, or To text to decode hex back into characters. You'll find hex in color codes, memory dumps, network packets, file signatures, URL encoding and many debugging tools.
Converting by hand means looking up every character. This tool does the whole string at once.
How to use the hex converter
- Paste your text or hex values.
- Choose To hex or To text.
- Submit to convert.
- Copy the result.
Examples
Text to hex
Input: Hi
Output: 4869
Accented text
Input: café
Output: 636166c3a9
c, a, f are one byte each; é is the two bytes c3 a9.
Hex to text
Input: 4d79426f747379
Output: MyBotsy
Uppercase hex
Input: 4D79
Output: My
Upper and lowercase digits decode the same.
Common uses
- Reading hex dumps from logs, packets or debugging tools.
- Encoding strings for programming or testing.
- Understanding percent-encoding in URLs (which uses hex).
- Solving puzzles and CTF (capture the flag) challenges.
- Learning number systems in computer science.
- Reading the raw bytes in a log file or network capture.
- Spotting hidden characters, such as a non-breaking space (c2a0) or a byte order mark (efbbbf), in text that looks normal.
- Preparing test data for hardware, APIs or databases that store bytes as hex.
Tips and things to know
- Hex is not case-sensitive:
4Aand4aare the same. - Prefixes like
0xmark hex in code; remove them before converting to text. - Hex color codes like
#8997BBare colors, not text. Use the color converter for those. - Related: binary converter, URL encoder and Base64 encoder.
Edge cases and limitations
- Hex to text needs one continuous string. Spaced pairs like
4d 79fail; remove the spaces first. - The number of digits must be even.
4d7fails because the last byte is incomplete. - Prefixes such as
0xor\xmust be removed before decoding. - Hex that decodes to binary data, not text, shows as unreadable symbols.
Frequently asked questions
What is hexadecimal?
A base-16 number system using 0–9 and A–F. One hex digit represents 4 bits, so two digits make one byte.
Why do programmers use hex?
It's much shorter than binary and maps neatly onto bytes, which makes raw data easier to read.
What is "hello" in hex?
68656c6c6f (one pair of digits per letter: 68 65 6c 6c 6f).
Is hex encoding the same as encryption?
No. It's just another way of writing the same data and can be reversed by anyone.
How many hex digits is one character?
Two for each byte. Plain English letters are one byte (2 digits), accented letters like é are two bytes (4 digits) and most emoji are four bytes (8 digits).
Related tools
- Binary converter: Convert text to binary and the other way for any string input.
- Ascii converter: Convert text to ascii and the other way for any string input.
- Decimal converter: Convert text to decimal and the other way for any string input.
- Base64 encoder: Encode any string input to Base64.
- Color converter: Convert your color to multiple other formats.
Similar tools
Convert text to binary code (Hi = 1001000 1101001) and binary back to text. Learn how computers store characters. Free online binary translator.
Convert text to ASCII character codes and ASCII codes back to text. Look up the number behind every letter and symbol. Free online ASCII converter.
Convert text into decimal character codes (H = 72) and decimal codes back to text. Useful for programming, encoding and puzzles. Free converter.
Popular free tools
Create strong, random passwords in one click. Pick the length and include uppercase, lowercase, numbers and symbols. Free, no signup.
Convert text to UPPERCASE, lowercase, Sentence case, Capital Case, camelCase, PascalCase, snake_case, CONSTANT_CASE, dot.case or param-case. Free.
Create a WhatsApp click-to-chat link with your phone number and a prefilled message. Add it to your site, bio, ads or QR codes. Free wa.me generator.
Upload a QR code image or screenshot and read the link or text inside it, no phone needed. Check where a QR code leads before you open it. Free.
Look up the DNS records of any domain: A, AAAA, CNAME, MX, NS, TXT and SOA. Check email, SPF, verification and nameserver settings for free.
Split any URL into its parts: scheme, host, path and query parameters. Inspect tracking links, UTM tags and API endpoints. Free online URL parser.