Home Tools Blog About

Convert WebP to Hex

In short

Convert WebP file to hex (4 formats, case toggle, hex-dump view with offset and ASCII). Magic-byte validated. Free, client-side.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up

Dump a WebP file as hexadecimal - 4 output formats (continuous, space, colon, C-array) plus a classic hex-dump view with offset column and ASCII gutter. Useful for inspecting headers (RIFF / WEBP / VP8L chunks) or comparing files byte-for-byte.

Drop a WebP to begin.
🛡
100% PrivateNo server uploads, ever
InstantRuns in your browser
💧
No WatermarksClean output, always
🆓
Free ForeverNo accounts, no limits

How to Use Convert WebP to Hex

  1. Drop a WebP file or click to open the picker. Validation checks the RIFF (52 49 46 46) + WEBP (57 45 42 50) magic bytes - files masquerading as WebP get rejected.
  2. Pick a flat-hex format. Use 0x-prefixed C-array if you're embedding bytes directly into source code; use space-separated for readability; use continuous for compact embedding.
  3. Toggle case (uppercase A-F default).
  4. Set row width for the classic hex-dump view - offset column on the left, hex bytes in the middle, ASCII gutter on the right. 16 bytes/row matches xxd / hexdump -C.

Frequently Asked Questions

What’s a hex dump?

A canonical way to display binary file contents: each row shows an offset (the byte position in the file), 8-32 bytes of data in hexadecimal, and the ASCII representation in a gutter on the right (with non-printable bytes shown as .). The 16-bytes-per-row form is what xxd and hexdump -C produce.

Why’s the file size limited to 10 MB?

A 10 MB file produces ~30 MB of hex-dump text (40-50 chars per row × ~625K rows). Rendering 30 MB of text in a browser textarea is slow – not a memory or stability issue (modern browsers handle it), just a UX one. The cap protects responsiveness. For larger files, use a desktop hex editor.

What can I learn from the first few bytes of a WebP?

Bytes 0-3 are always 52 49 46 46 (ASCII “RIFF”). Bytes 4-7 are the little-endian RIFF chunk size = total file size minus 8. Bytes 8-11 are 57 45 42 50 (“WEBP”). Bytes 12-15 are the inner chunk type, usually VP8 (lossy), VP8L (lossless), or VP8X (extended with metadata).

What’s the difference between flat hex and hex dump?

Flat hex is just the bytes in one of 4 layouts – for copy-pasting into code. Hex dump includes the offset and ASCII gutter – for visual inspection and structure detection. Choose flat for embedding, dump for reading.

Why does the ASCII gutter show dots?

Standard hex-dump convention: bytes outside ASCII printable range (32-126) are shown as . so each character occupies the same width as a printable byte. Most of a WebP file is non-printable image data – expect lots of dots.

Is my file uploaded?

No. The file is read locally with the FileReader API – nothing is sent to a server, logged, or stored, and the tool keeps working offline once the page has loaded.

Can I edit the hex and write it back to WebP?

Not in this tool. Modifying RIFF/WEBP bytes requires recalculating chunk sizes and (for VP8L) checksums – a proper hex editor handles this. This tool is read-only inspection.

Why are some bytes shown as 20, 0A, 09?

Those are ASCII space (0x20), newline (0x0A), and tab (0x09). In the ASCII gutter, space renders as a literal space, while newline/tab are non-printable and render as . – the convention is to only show typeable graphic characters.

Does the case toggle affect anything besides A-F?

No, only the letter portion of hex (A-F vs a-f). The digits 0-9 are the same in both cases.

Is hex bigger than the original file?

Yes, exactly 2× for continuous; 3× or 4× with separator. The hex-dump adds offset (8 chars + 2 spaces) and ASCII gutter (rowWidth + 2 chars) per row – typically ~4× the input file size.

Keep going

Related Tools

All Webp tools →
Share

Embed this tool

Add this free tool to your website. Copy and paste the code: