Converters

Hex to Text Conversion: ASCII Table, Hex Dumps & Programming Guide

Learn how to convert hexadecimal to text using ASCII encoding. Includes complete ASCII hex table, how to read hex dumps, programming examples in Python and JavaScript, and common hex values every developer should know.

Published March 20, 2026
14 minute read
Cryptography Guide

Hex to Text Conversion: ASCII Table, Hex Dumps & Programming Guide

Hexadecimal is the lingua franca of low-level computing. Whether you are debugging network packets, reading memory dumps, inspecting file headers, or working with cryptographic hashes, the ability to convert between hex and readable text is an essential skill.

This guide covers everything you need to know about hex-to-text conversion: how ASCII and UTF-8 map characters to hex values, how to read hex dumps, and how to perform conversions in code. Try our free hex to text converter to follow along with any example below.

How Hex Represents Text

Computers store text as sequences of bytes, where each byte has a numeric value between 0 and 255. Hexadecimal (base-16) provides a compact way to express these byte values using exactly two digits per byte (00 to FF).

The mapping from bytes to characters is defined by character encodings:

  • ASCII: Maps values 0-127 to English letters, digits, punctuation, and control characters
  • UTF-8: Extends ASCII to cover all Unicode characters (every script, symbol, and emoji)

Example: "Hello" in Hex

CharacterASCII DecimalHex Value
H7248
e10165
l1086C
l1086C
o1116F

So "Hello" in hex is: 48 65 6C 6C 6F

Complete ASCII Hex Table

The ASCII standard defines 128 characters (0-127). Here are all 95 printable characters with their hex, decimal, and binary values:

Digits (0x30-0x39)

CharHexDecBinary
0304800110000
1314900110001
2325000110010
3335100110011
4345200110100
5355300110101
6365400110110
7375500110111
8385600111000
9395700111001

Uppercase Letters (0x41-0x5A)

CharHexDecCharHexDecCharHexDec
A4165J4A74S5383
B4266K4B75T5484
C4367L4C76U5585
D4468M4D77V5686
E4569N4E78W5787
F4670O4F79X5888
G4771P5080Y5989
H4872Q5181Z5A90
I4973R5282

Tip: Uppercase letters start at 0x41 (65). Lowercase letters start at 0x61 (97). The difference is exactly 0x20 (32) -- flipping bit 5 toggles case.

Lowercase Letters (0x61-0x7A)

CharHexDecCharHexDecCharHexDec
a6197j6A106s73115
b6298k6B107t74116
c6399l6C108u75117
d64100m6D109v76118
e65101n6E110w77119
f66102o6F111x78120
g67103p70112y79121
h68104q71113z7A122
i69105r72114

Common Symbols (0x20-0x2F, 0x3A-0x40, 0x5B-0x60, 0x7B-0x7E)

CharHexDecCharHexDecCharHexDec
(space)2032:3A58[5B91
!2133;3B59\5C92
"2234<3C60]5D93
#2335=3D61^5E94
$2436>3E62_5F95
%2537?3F63`6096
&2638@4064{7B123
'2739}7D
(2840~7E126
)2941
*2A42
+2B43
,2C44
-2D45
.2E46
/2F47

How to Read Hex Dumps

A hex dump displays file or memory contents in a standardized format with three columns:

Offset     Hex bytes                                      ASCII
00000000   48 65 6C 6C 6F 2C 20 57  6F 72 6C 64 21 0A 54 68  |Hello, World!.Th|
00000010   69 73 20 69 73 20 61 20  68 65 78 20 64 75 6D 70  |is is a hex dump|
00000020   20 65 78 61 6D 70 6C 65  2E 0A                    | example..|

Column Breakdown

  1. Offset (left): Memory address or file position in hex. Each row is 16 bytes apart (0x10).
  2. Hex bytes (middle): 16 bytes shown as hex pairs, often split into two groups of 8.
  3. ASCII (right): Printable characters shown as-is; non-printable bytes shown as .

Common Control Characters in Hex Dumps

HexNameMeaning
00NULNull byte (string terminator in C)
0ALFLine feed (Unix newline \n)
0DCRCarriage return (\r)
0D 0ACRLFWindows newline (\r\n)
09TABHorizontal tab (\t)
1BESCEscape character
7FDELDelete

Command-Line Hex Dump Tools

Bash12 lines
Highlighting code...

UTF-8 Multi-Byte Characters

ASCII covers only 128 characters. For international text, emoji, and symbols, UTF-8 uses 1 to 4 bytes per character:

Unicode RangeBytesHex PatternExample
U+0000-U+007F1 byte0xxxxxxxA = 41
U+0080-U+07FF2 bytes110xxxxx 10xxxxxxé = C3 A9
U+0800-U+FFFF3 bytes1110xxxx 10xxxxxx 10xxxxxx中 = E4 B8 AD
U+10000-U+10FFFF4 bytes11110xxx 10xxxxxx 10xxxxxx 10xxxxxx😀 = F0 9F 98 80

How to Identify UTF-8 in Hex

The leading byte tells you how many bytes the character uses:

  • 00-7F: Single byte (ASCII)
  • C0-DF: First byte of a 2-byte character
  • E0-EF: First byte of a 3-byte character
  • F0-F7: First byte of a 4-byte character
  • 80-BF: Continuation byte (never starts a character)

Hex-to-Text Conversion in Programming

Python

Python14 lines
Highlighting code...

JavaScript

JavaScript18 lines
Highlighting code...
560 chars

Command Line

Bash8 lines
Highlighting code...

Common Hex Values Every Developer Should Know

HexMeaningWhere You'll See It
FF FEUTF-16 LE BOMStart of UTF-16 files
FE FFUTF-16 BE BOMStart of UTF-16 files
EF BB BFUTF-8 BOMStart of UTF-8 files (optional)
89 50 4E 47PNG file header.png magic bytes
FF D8 FFJPEG file header.jpg magic bytes
25 50 44 46PDF file header (%PDF).pdf magic bytes
50 4B 03 04ZIP file header.zip, .docx, .jar magic bytes
7F 45 4C 46ELF headerLinux executables
CA FE BA BEJava class file.class magic bytes
DE AD BE EFDebug markerCommon debug/magic constant
00 00 00 00Null bytesUninitialized memory

These "magic bytes" (file signatures) at the start of files identify the file format regardless of the file extension.

Hex to Text vs Hex to Decimal

These are different operations that are frequently confused:

OperationInputOutputPurpose
Hex to text48 65 6C 6C 6FHelloCharacter encoding lookup
Hex to decimalFF255Number base conversion
Hex to binaryA310100011Number base conversion

Hex to text interprets each hex pair as a character encoding (ASCII/UTF-8). Hex to decimal converts a hex number to base-10. Use our hex to decimal converter for number conversions or our hex to binary converter for binary conversions.

Frequently Asked Questions

How do I know if a hex string is text or binary data?

Look at the byte values. If most bytes fall in the printable ASCII range (0x20-0x7E), it is likely text. If you see many values outside this range (especially 0x00, 0x80-0xFF), it is probably binary data. Hex dump tools show the ASCII interpretation alongside hex values to help you identify text within binary files.

Why do some hex strings start with 0x?

The 0x prefix is a programming convention (used in C, Java, Python, JavaScript) that tells the compiler/interpreter the number is hexadecimal, not decimal. It has no effect on the value: 0x41 and 41 in hex are the same number. When converting hex to text, strip any 0x prefixes before processing.

What is the difference between big-endian and little-endian hex?

Endianness affects the byte order of multi-byte values (like integers), not individual bytes. Big-endian stores the most significant byte first (0x00 0x01 = 1), while little-endian stores the least significant byte first (0x01 0x00 = 1). Text encoding (ASCII/UTF-8) is always read left-to-right, so endianness does not affect hex-to-text conversion.


Ready to convert hex? Try our hex to text converter for instant conversion with a character breakdown table. For related conversions, check out our hex to binary converter, hex to decimal converter, and binary translator.

About This Article

This article is part of our comprehensive converters cipher tutorial series. Learn more about classical cryptography and explore our interactive cipher tools.

More Converters Tutorials

Try Converters Cipher Tool

Put your knowledge into practice with our interactive convertersencryption and decryption tool.

Try Converters Tool