Text to Hex Converter

Enter your message into the Text Input field and the Text to Hex Converter maps every character to its hexadecimal code point. Click Convert and the full string of hex values lands in Hex Output, in the same order you typed them. Use the text to binary converter to turn any string of text into its binary character codes for copying elsewhere.

Understanding the Text to Hex Converter: Characters, Code Points, and Hex

Every Character Is a Number Underneath

Computers don't store letters directly — every character is really a number under the hood, called its code point. Unicode is the standard that assigns a unique code point to essentially every character in every writing system: the Latin alphabet, digits, punctuation, emoji, and scripts far beyond basic English text. This converter reads each character in your input and writes out its underlying code point in hexadecimal — not just for the original 128-character ASCII range, but for any Unicode character you type. If you are debugging low-level code, the decimal to binary converter converts each decimal value you enter into its exact binary equivalent.

Introduction to the Hexadecimal System

The hexadecimal system (hex, for short) is a base-16 numeral system that uses sixteen symbols: the ten digits 0–9 plus the letters A–F, representing values 10 through 15. Each hex digit stands for four bits, making hex a compact, precise way to write out a character code. For instance, the capital letter "A" has code point 65 in decimal, which is 41 in hexadecimal.

Text to Hex vs. Text to Binary vs. Text to Decimal

FormatHow 'A' LooksBest For
Decimal65Reading ASCII tables, quick arithmetic
Hexadecimal41Debugging, protocol dumps, compact notation
Binary01000001Seeing the raw bit pattern

All three represent the exact same underlying code point — just written in a different base. If you need decimal or binary instead of hex, this site's Text to Decimal Converter and Text to Binary Converter run the same code-point logic in those bases.

Infographic showing how to convert the text Cat to hex: each character's decimal code point (C=67, a=97, t=116) is converted to hexadecimal, giving 43 61 74
Text to Hex Converter: Cat = 43 61 74

How to Convert Text to Hex: Manual Method and Worked Examples

Manual Conversion from Text to Hex

You can convert text to hexadecimal by hand using a Unicode or ASCII table as reference: The fastest way to see a number's BCD nibbles is the decimal to bcd converter, which can also group them for readability.

  1. Look up the character's code point (decimal) using a Unicode or ASCII reference table.
  2. Convert that decimal value to hexadecimal by repeated division by 16, recording remainders.
  3. Move to the next character and repeat, keeping the characters in their original order.

Worked Example: 'hello' to Hexadecimal

CharacterCode Point (decimal)HexadecimalBinary
h1046801101000
e1016501100101
l1086c01101100
l1086c01101100
o1116f01101111
hello → 68 65 6c 6c 6f

Each character converts independently and in order, which is exactly how the live converter builds its Hex Output — one space-separated hex value per character.

Worked Example: A Character Beyond Basic ASCII

Because this tool works with full Unicode code points rather than the narrow 128-character ASCII range, an accented character like é (code point 233 decimal) converts cleanly to e9 in hex — something a strictly ASCII-only converter couldn't represent at all. The same is true for emoji, non-Latin scripts, and any other character with a Unicode code point.

Using the Text to Hex Converter

Input, Output, and Batch Conversion

Type or paste your text into the Text Input field. The Hex Output box updates live as you type — no button required, though a Convert button is available too. Every character, including spaces and punctuation, gets its own hex value in the output, separated by spaces and in the same order you typed them. Use the Copy button to grab the result, and the Clear button to reset both fields for a new conversion. Designers working from an HSV color picker often use the hsv to hex converter to get the equivalent hex code.

Decoding Hex Back to Text

Separate each hex value with a space or a new line when you're decoding hex back to text on the companion Hex to Text Converter — that tool splits on whitespace and treats each token as one character's code point, so the same space-separated format this converter outputs feeds directly back in.

Common Uses for the Text to Hex Converter

Where This Comes Up in Practice

  • Encoding and obfuscation checks: quickly seeing what a string of character codes actually spells, or generating codes from text for a script or config file.
  • Debugging text encoding issues: verifying exactly which code points a string contains when something looks garbled after being copied between systems.
  • Learning character encoding: seeing the direct, one-to-one mapping between letters and their underlying numeric codes, without a cipher or transformation involved.
  • CTFs and puzzles: generating or decoding simple character-code challenges where hex is the chosen representation.
  • Web and HTML color codes: hex notation also shows up in HTML/CSS colors (like #ffffff for white) — a good reminder that hex is a general-purpose base, not something unique to text encoding.

Text to Hex Conversion Reference

Selected Character Table

Common Characters and Their Hex Code Points
CharacterDecimalHexadecimalBinary
0483000110000
1493100110001
A654101000001
B664201000010
a976101100001
b986201100010
Space322000100000
!332100100001
@644001000000
é233e911101001

Code Snippets for Developers

// JavaScript — convert text to hex using code points
function textToHex(str) {
  return Array.from(str).map(function(ch) {
    return ch.codePointAt(0).toString(16);
  }).join(' ');
}
// Usage: textToHex('hello') // Returns '68 65 6c 6c 6f'
// Python equivalent
def text_to_hex(s):
    return ' '.join(format(ord(ch), 'x') for ch in s)

text_to_hex('hello')  # '68 65 6c 6c 6f'

Note that Array.from(str) (JavaScript) and iterating a Python string both correctly handle characters outside the Basic Multilingual Plane, such as many emoji — a naive character-by-character loop in some languages can split those into two surrogate halves instead of one code point, producing the wrong hex value.

Text to Hex Converter: Frequently Asked Questions

  • Does this support characters beyond basic English text?
    Yes — it works with any Unicode character, not just the original ASCII range. Each character's actual code point is used, whatever it is, including accented letters, symbols, and emoji.
  • Does this tool send my text anywhere?
    No. Everything runs locally in your browser using client-side JavaScript. Nothing you type is uploaded or stored.
  • Is this the same as encryption?
    No — this is a direct, publicly-known representation of each character's code point, not a cipher. It doesn't provide any security or secrecy.
  • How should I separate hex values when decoding text back from hex?
    Separate each value with a space or a new line on the Hex to Text Converter — it splits on whitespace and treats each token as one character's code.
  • Why is a character's hex value sometimes only one digit instead of two?
    Code points below 16 (mostly control characters, rarely typed directly) convert to a single hex digit rather than a zero-padded pair — the output reflects the code point's actual value rather than a fixed width.