Skip to content
Text to Hex ASCII ↔ Hexadecimal Converter

Text to Hex Converter

Real-time ASCII/Unicode text to hexadecimal conversion. Type or paste any text and each character is turned into its hex value instantly, right in your browser.

Text to Hex Converter for Strings, Letters and Everyday Text

Use Text to Hex Converter to turn a word, sentence or text string into hexadecimal values. Type or paste your content into the tool above, choose an output format, and copy the result. Conversion happens as you type, so there is no separate submit button to press.

For ordinary ASCII text, each character produces a two-digit hexadecimal value. For example, Go! becomes 47 6F 21. The capital G, lowercase o and exclamation mark each contribute their own value, in the same order as your input.

The tool also accepts non-ASCII characters, but its output follows JavaScript’s UTF-16 code units rather than UTF-8 byte encoding. That distinction matters when working with accented letters, other writing systems or emoji. The examples below explain what to expect before you copy the output into another application.

Use this page to check character values, prepare small text examples, inspect unexpected spaces, or convert text to hexadecimal for a task that accepts this representation.

How to Convert Text to Hex

  1. 1. Enter your original text

    Type or paste into Input Text. Enter only the content you want converted: extra quotation marks, labels and trailing spaces become part of the result too.

    You can convert letters to hex individually or enter a complete string. Numbers typed here are treated as text characters. Entering 42, for instance, converts the character 4 followed by the character 2; it does not convert the number forty-two between number systems.

  2. 2. Choose a delimiter

    Open the Delimiter menu and select Space, None, Prefix 0x, Colon, or Comma. These options control how the hexadecimal values are displayed together.

    Leave Space selected when you want an easy-to-read result. Choose another format when your destination specifies a different separator. Changing the delimiter updates the existing output without requiring you to enter the text again.

  3. 3. Read the hexadecimal result

    The converted string appears in Hexadecimal Result. Hexadecimal letters are displayed in uppercase, so a value containing f is written with F. There is no lowercase-output control in the current interface.

    Check the beginning and end of the result if you pasted text from a document. An unexpected leading or trailing 20 can indicate an ordinary space that came along with your selection.

  4. 4. Copy, edit or clear

    Select Copy Hex to copy the current result, including the chosen delimiters and prefixes. Clipboard access depends on your browser allowing the copy action. If copying is blocked, select the output and copy it manually.

    Use Clear to empty both fields and reset the statistics. Load Sample inserts Hello World! and converts it with the currently selected delimiter. You can then edit that sample to see how individual changes affect the output.

Choose the Right Hexadecimal Output Format

The five formatting options represent the same underlying input values. They change the presentation, not the original text or the conversion method.

For the input Go!, the results are:

Delimiter optionOutputUseful when
Space 47 6F 21 Reading or checking each value separately
None 476F21 A destination requests continuous ASCII hex
Prefix 0x 0x47 0x6F 0x21 You need visibly marked hexadecimal values
Colon 47:6F:21 Your required format separates values with colons
Comma 47,6F,21 You need a comma-separated list of values

Formatting spaces are different from encoded spaces

With Space selected, the spaces between output groups are separators. An actual space inside your original text is represented by 20.

For example, A B becomes 41 20 42. Selecting None changes that to 412042. The visible separators disappear, but 20 remains because it belongs to the input.

This distinction is helpful when you need text to hex without spaces. Removing output separators does not remove whitespace from the source text. To exclude an input space, delete it from the input itself.

Output separators are formatting; the encoded space 20 belongs to your input.

What Happens During Text to Hex Conversion?

Hexadecimal is a base-16 number system. It uses 0–9 for the first ten values and A–F for values ten through fifteen. A character’s numeric code can be written in hexadecimal just as an ordinary number can.

This text to hexadecimal converter reads the input in order, converts each UTF-16 code unit to base 16, and joins the results using your chosen delimiter. Values shorter than two hexadecimal digits receive a leading zero. Larger values are kept at their required length.

For standard ASCII characters, the code-unit value matches the ASCII character code. That makes the page useful as an ASCII to hex converter for ordinary English letters, digits and common punctuation.

Each character is converted in input order, then the values are joined with the selected delimiter.

A simple manual conversion

Take the letter G. Its ASCII value is 71 in decimal. Divide that value by sixteen:

71 = 4 × 16 + 7 → 47

The hexadecimal representation is therefore 47. The first digit counts groups of sixteen, and the second counts the remaining units.

For the lowercase letter o, the decimal value is 111:

111 = 6 × 16 + 15 → 6F

F represents fifteen, so the hexadecimal value is 6F. Repeat the process for each character, keep the original order, and you have the complete string.

No measurement units or rounding choices are involved in this conversion. The relevant choices concern character representation and output formatting. A different encoding can produce different hexadecimal values for the same visible non-ASCII text.

Text to Hex Examples You Can Check

The following examples use the Space option. Each row shows the exact input, including capitalization and punctuation.

Input textHexadecimal result
Go! 47 6F 21
go! 67 6F 21
A B 41 20 42
Room 7 52 6F 6F 6D 20 37
42 34 32
@home 40 68 6F 6D 65

Convert words to hexadecimal

Enter Room 7. The tool converts R to 52, both o’s to 6F, m to 6D, the space to 20, and the digit 7 to 37.

The output contains six groups because this example contains six ASCII characters. The two words shown by the word counter do not become two output groups; conversion works through individual code units, not whole words.

Compare uppercase and lowercase letters

Go! and go! differ only in their first character, so only the first output group changes: 47 becomes 67.

Uppercase hexadecimal output does not mean your input is converted to uppercase. The tool preserves the distinction between capital and lowercase input letters while using capital A–F to write hexadecimal values.

Inspect punctuation and repeated characters

Punctuation is converted rather than discarded. An exclamation mark contributes 21, while @ contributes 40. Repeated letters produce repeated values because each occurrence is processed separately.

If you convert a word surrounded by quotation marks, those quotation marks appear in the output too. To obtain only the word’s values, enter only the word. This is especially useful when copying examples from written instructions.

ASCII to Hex Table for Common Characters

Use this short reference to check individual results. The table covers selected ASCII characters, not the complete Unicode character set.

An ASCII hexadecimal chart helps explain why a visible digit is not represented by its face value. The character 7 uses code 37, whereas the numeric value seven is simply 7 in hexadecimal.

If you need to convert letters to hexadecimal for a classroom task, compare one uppercase and one lowercase version first. Then add a space or punctuation mark. This makes it easier to see which parts of the input contribute to the result.

The table also gives you a quick way to check a single suspicious character without rereading an entire output string.

CharacterDecimal codeHexadecimal
Space 32 20
! 33 21
, 44 2C
. 46 2E
0 48 30
7 55 37
9 57 39
@ 64 40
G 71 47
R 82 52
g 103 67
o 111 6F

Understand Unicode, UTF-16 and Non-ASCII Results

An English to hexadecimal translator is straightforward when the input stays within ASCII. Other characters require closer attention to how the text is represented.

This tool uses UTF-16 code-unit values. It does not first encode your text into UTF-8 bytes, and it does not provide an encoding selector. Its output is also not a fully padded UTF-16 byte stream with a chosen byte order.

Why a character can produce more than two digits

A code unit can require up to four hexadecimal digits. The tool adds padding only when a value has fewer than two digits, so Ā produces 100, not 0100.

That means a group is not always one byte. In ASCII examples, each two-digit group fits within one byte, but that convenient relationship does not describe every Unicode result.

One visible emoji, two UTF-16 code units in this tool, four bytes in UTF-8.

Compare the actual representations

InputThis tool’s output, using SpaceUTF-8 bytes for comparison
é E9 C3 A9
€ 20AC E2 82 AC
Ā 100 C4 80
😀 D83D DE00 F0 9F 98 80

The UTF-8 column explains why another converter may show a different answer. It is a comparison, not an alternative mode available in this tool.

The emoji uses a surrogate pair: two UTF-16 code units representing one Unicode code point. Consequently, one visible symbol can produce two output groups and increase the displayed character count by two.

Keep separators when inspecting Unicode

For non-ASCII input, Space, Colon or Comma helps preserve the boundaries between values. With None, groups of different lengths are joined without boundaries, which can make the result ambiguous to interpret later.

For example, ĀA gives 100 41 with spaces and 10041 without them. Do not automatically split that continuous output into two-digit byte pairs. If your destination requires UTF-8 bytes or fixed-width UTF-16 data, you need a conversion method that explicitly produces that format.

Spaces, Tabs and Line Breaks Are Part of Your Text

A string to hex converter makes invisible characters easier to notice. Ordinary spaces, tabs and line feeds have character codes even though they do not display like letters.

CharacterHexadecimal codeMeaning
Ordinary space 20 A space between or around text
Tab 09 A tab character
Line feed 0A A newline character used in the input
Carriage return 0D A separate control character, if present

For A, followed by a line feed, followed by B, the output is 41 0A 42. The line feed becomes a value in the output rather than remaining an output line break.

Browser text fields can normalize pasted line endings, so this page should not be used to inspect the exact original bytes of a file. It converts the text available in the input field after pasting.

A visually blank input can still contain spaces or other whitespace. If output remains when you think the box is empty, select Clear and enter the intended text again. Also remember that a non-breaking space can look like an ordinary space while having a different code.

Read the Statistics Correctly

The statistics panel displays Characters, Words and Total Hex Bytes. These figures help describe the entry, but they do not all measure what their labels might suggest for every input.

Characters

The character count follows JavaScript string length, which counts UTF-16 code units. For ordinary ASCII text, it matches the number of letters, digits, spaces and punctuation marks you entered.

For emoji and some other symbols, the number can exceed the count of visible characters. This is a representation detail, not evidence that an extra visible letter was inserted.

Words

The word count separates nonempty text at whitespace. It is a rough count of whitespace-separated groups, not a linguistic analysis. Room 7 counts as two words; punctuation attached to a word does not create a separate group.

Total Hex Bytes

Treat this display cautiously. The current counter estimates pairs of hexadecimal digits from the formatted output. It is not a reliable measure of UTF-8 size, UTF-16 file size or memory usage.

In particular, selecting Prefix 0x can increase this displayed count even though the input has not changed. For Go!, the regular spaced result shows three, while the prefixed result currently shows four. The extra count comes from the formatting calculation, not an additional character in your text.

Use the output values and the known encoding requirements of your destination when exact data size matters.

Put the Converted Text to Use

Check small strings while debugging

If a label, command or test message behaves unexpectedly, convert the exact text you are using. Compare its values with the expected sequence, especially around spaces and punctuation.

For an ASCII-only example, the result can help reveal an extra trailing space or a different capital letter. For non-ASCII messages, first confirm that the system you are debugging uses a compatible representation.

Prepare examples for learning

Use the page to connect letters, decimal character codes and hexadecimal values. Try a short word, change one character, and explain the difference in the output.

The tool provides the conversion result; the reference table and manual calculation above help you understand it. This is more useful than memorizing a long hexadecimal alphabet chart without seeing how the values relate to actual text.

Format a short result for another application

Choose a delimiter that matches the application’s requirements, then copy the output. Check whether it expects character-code values, byte pairs, prefixes, or a quoted string.

The right separator cannot fix an encoding mismatch. A text to hex string that looks correctly formatted may still represent something different from the UTF-8 bytes a destination expects. Test a short known example before transferring a longer string.

Avoid Common Conversion Mix-Ups

  • Text conversion is different from number conversion. Typing 42 gives 34 32. Converting decimal forty-two to hexadecimal gives 2A. Both answers are valid for their respective tasks.

  • Hexadecimal representation is not encryption. Converting readable text to hex does not introduce a secret key or protect the message from someone who understands the representation. Do not treat hexadecimal text as a password-protection method.

  • Text hex is different from colour hex. Entering red converts its letters; it does not generate an RGB colour value. A hex converter for colours serves a different purpose.

  • This page converts in one direction. It does not include a hex to text converter or a reverse switch. If you paste 47, it treats those two digits as text and outputs 34 37, rather than decoding them into G.

  • Pasted text is not an uploaded file. You can copy text from a document into the input, but the current tool does not read file bytes or offer a file-upload control. Use it for text conversion, not as a replacement for a file hex viewer.

Convert Your Next String

Enter your text in the tool above, choose a delimiter, and review the hexadecimal result. For a first check, use a short ASCII example whose characters you can follow individually. Then copy the result in the format your destination needs, keeping the Unicode representation rules in mind when your text includes other characters.

Go to the converter

Frequently Asked Questions

Is text to hex the same as ASCII to hex?
For standard ASCII input, this tool produces the familiar ASCII values in hexadecimal. The difference matters outside the ASCII range: the tool displays UTF-16 code-unit values rather than UTF-8 bytes. Check the character representation your destination expects before using non-ASCII output.
Can I convert a text file using this page?
You can open a text file elsewhere, copy its contents and paste them into Input Text. There is no file-upload control here. Pasting does not preserve every detail of the original file encoding or line endings, so the result is not a byte-for-byte file dump.
Can this tool translate hexadecimal back to English?
No. This interface converts entered text into hexadecimal values. To convert hex to text, you need a decoder that matches the representation used to produce the data. Entering an existing hex string here converts its literal characters again instead of decoding it.
Why do two text to hex converters give different results?
They may use different encodings or different output formatting. Spaces and letter case can change appearance without changing a value. For accented letters and emoji, UTF-8 bytes and this tool’s UTF-16 code-unit values can differ substantially. Compare the encoding rules before assuming either result is wrong.
Does changing the delimiter change my original text?
No. The delimiter changes only the way output values are joined or prefixed. Your input stays the same. Selecting None removes separator spaces from the output, but an actual space in your input still contributes its own value, usually 20 for an ordinary space.
Is there a difference between uppercase and lowercase hex?
Hexadecimal 6F and 6f represent the same number. This tool displays uppercase hexadecimal letters. That is separate from input capitalization: G and g are different text characters and produce different values, 47 and 67 respectively.
Why does one emoji count as two characters?
Some emoji require two UTF-16 code units, called a surrogate pair. The character counter counts those units rather than visible symbols. For example, 😀 produces D83D DE00 and counts as two. More complex emoji sequences can contain additional units.
What does a leading zero mean in the output?
A leading zero keeps small values at a minimum width of two hexadecimal digits. A tab, for example, appears as 09. The zero does not change its numeric value. The tool does not pad every larger code-unit value to a fixed four-digit width.
Why does Copy Hex not copy anything?
First check that Hexadecimal Result contains output. The copy button does nothing when it is empty. If output exists but copying fails, your browser may be blocking clipboard access. Select the result and use your device’s normal copy command as an alternative.
Will leading or trailing spaces be removed automatically?
No. The conversion retains spaces from the input, including those at the beginning or end. An ordinary space contributes 20 wherever it occurs. Remove unwanted spaces before copying the result; changing the output delimiter does not remove characters from your source text.