$devtoolkit.sh/examples/encoding/hex-dump

Hex Dump and Text-to-Hex Encoding

A hex dump shows the hexadecimal byte values of text or binary data alongside its ASCII representation, which is the standard way to inspect binary files, network packets, and protocol messages at the byte level. This collection shows hex dump output for common strings and protocol magic bytes. The text-to-hex converter is useful when constructing binary protocol messages, debugging network captures, and verifying byte-level encoding in security work. Each ASCII character maps to a predictable two-digit hex value you will quickly memorize.

Example
# ASCII text to hex
Hello → 48 65 6C 6C 6F
World → 57 6F 72 6C 64

# HTTP method bytes
GET  → 47 45 54
POST → 50 4F 53 54

# File magic bytes (signatures)
PNG:  89 50 4E 47 0D 0A 1A 0A
JPEG: FF D8 FF E0
PDF:  25 50 44 46 2D    (%PDF-)
ZIP:  50 4B 03 04

# Null byte and control chars
\0  = 00    \n = 0A    \r = 0D    \t = 09
[ open in Text to Hex → ]

FAQ

What is a hex dump used for?
Hex dumps are used to inspect binary files, debug network protocols, analyze malware samples, and verify file formats. They show the exact byte content without any interpretation that could mask encoding issues.
Why do text files appear differently in hex editors?
Different text editors use different line ending formats. Unix files use 0A (LF), Windows uses 0D 0A (CRLF), and old Mac files used 0D (CR). A hex dump instantly reveals which format a file uses.
What are magic bytes?
Magic bytes (or file signatures) are specific byte sequences at the beginning of a file that identify its format. The PNG signature 89 50 4E 47 starts with a non-ASCII byte to prevent misidentification as a text file.

Related Examples

/examples/encoding/hex-dumpv1.0.0