🔍 Hex Viewer - View Binary Data in Hexadecimal

📁
⚙️
📝

Select any file to view its hex dump

File: {{ fileInfo.name }}
Size: {{ formatBytes(fileInfo.size) }}
Type: {{ fileInfo.type ||'Unknown' }}
🔍
No data to display. Upload a file or enter data above.
📊
Total Size: {{ formatBytes(statistics.totalBytes) }}
Null Bytes: {{ statistics.nullBytes }}
Printable: {{ statistics.printableBytes }}
Entropy: {{ statistics.entropy.toFixed(2) }} bits
Control Chars: {{ statistics.controlBytes }}
High Bytes: {{ statistics.highBytes }}
File Type Hint: {{ getFileTypeHint() }}
📈
0x{{ item.byte.toString(16).toUpperCase().padStart(2,'0') }} ({{ item.char }})
{{ item.count }}
⚠️ {{ error }}

ℹ️ About Hex Viewer

Hex Viewer is a byte inspection tool for turning selected files, pasted hex, Base64, or typed text into a classic hex dump. It shows each byte as a two-character Base16 value, preserves byte offsets from zero, and pairs the dump with an ASCII preview, byte distribution, entropy estimate, and simple file signature hints.

Hexadecimal is useful because one byte maps cleanly to two digits from 00 through FF. For the Base16 encoding rules, see RFC 4648 section 8. The offset-and-bytes layout follows the same inspection pattern as POSIX dump tools such as od, and the text column is based on printable 7-bit ASCII characters defined in RFC 20.

Practical uses:

  • Check file signatures such as 89 50 4E 47 for PNG, 25 50 44 46 for PDF, 50 4B 03 04 for ZIP, 7F 45 4C 46 for ELF, or 4D 5A for Windows PE files.
  • Find unexpected null bytes, control characters, padding, or high-byte data when a file or message looks corrupted.
  • Compare binary protocol samples, packet payloads, memory fragments, or CTF artifacts by offset instead of by rendered text.
  • Verify what bytes will be hashed, checksummed, encoded, or embedded before using a file hash, checksum, Base64, or data URI tool.

Input and display notes:

  • Pasted hex may include spaces, separators, or prefixes; the byte stream still needs an even number of hex digits.
  • Base64 input is decoded before display, so the dump shows the original bytes rather than the Base64 text.
  • Typed text is encoded as UTF-8 before inspection; browser text encoding behavior is specified by the WHATWG Encoding Standard.
  • Two-byte grouping is only a visual aid. It does not decide endian order or parse integers, pointers, structures, or protocol fields.

Examples and limitations:

  • Text such as Hello appears as 48 65 6C 6C 6F with the ASCII preview Hello.
  • A sequence such as 48 00 69 keeps the null byte visible as 00, even though that byte is not printable text.
  • File type hints are heuristic. They use common magic bytes and entropy signals, but they are not a substitute for a full parser, malware scanner, or disassembler.
  • Very large files can be slow or memory-heavy because the page has to read and render every selected byte. The interactive file picker reads local files in the browser; API requests send the supplied data to the service.

API Usage Example:

POST /api/tools/webdev/hex-viewer
Content-Type: application/json

{
    "inputMethod": "hex",
    "inputData": "48656C6C6F",
    "displayOptions": {
        "showAddresses": true,
        "showASCII": true,
        "colorCode": true,
        "groupBytes": false,
        "bytesPerRow": 16
    }
}
Ready