Text Tools

Analyze Base64 Magic Bytes, MIME and Padding

Inspect Base64 alphabet, padding, decoded size and magic bytes to identify common encoded file formats locally before decoding or converting them.

File typeMIME typeDecoded sizeSignature / validity
Input

Base64 analyzer

Base64 Magic Bytes, MIME and Padding Analyzer

Inspect Base64 syntax, padding, decoded size, MIME clues and magic bytes to identify PNG, JPEG, PDF and other encoded formats without uploading the data.

How to use this tool

  1. Paste your text into the input field.
  2. Click the action button to process it.
  3. Copy or download the result.

Privacy

Processed locally; nothing is uploaded.

Inspection details

Magic bytes, padding and Base64 format detection

Base64 text carries no universal filename, so reliable inspection combines several clues: a data-URL MIME declaration when present, Base64 syntax and padding, the estimated decoded byte count, and magic bytes from the decoded prefix. Those signals can identify many common files before a full preview is attempted.

Decoded size can be estimated from the Base64 length because four encoded characters normally represent three bytes. Padding characters at the end reduce the final byte count, while whitespace and surrounding wrappers should be removed before calculating the estimate.

Magic-byte checks

  • PNG: 89 50 4E 47
  • JPEG: FF D8 FF
  • PDF: 25 50 44 46 (%PDF)
  • ZIP-based files: 50 4B 03 04

Decoded-size estimate

  • Start from normalized Base64 length.
  • Every four Base64 characters encode up to three bytes.
  • Subtract bytes implied by one or two trailing = padding characters.
MIMEmagic bytespaddingdecoded bytesBase64URL