⚡ Magic Byte File Detection & Data URI Decoders

Base64 Decoder Online

Decode Base64 strings (Standard RFC 4648, Base64URL, MIME, PEM) back to text, JSON, images, PDFs, ZIP archives, or hex with magic byte file signature detection and 100% browser privacy.

Format: STANDARD (JSON)
Input Mode:
Output Mode:
Base64 Input String
Decoded: 88 B
Decoded Output (JSON)

How to Use the Base64 Decoder

1

Paste Base64 String

Paste any Base64 string, Base64URL, JWT token, or Data URI (data:image/png;base64,...).

2

Select Input Mode

Choose Auto-detect Variant (Default), Standard Base64, or Base64URL.

3

Select Output View

View Decoded Text, Image/PDF Preview, JWT Inspector, Hex Dump, or Bit Matrix.

4

Inspect & Export

Verify magic byte file signatures, inspect Shannon entropy, and copy or download output.

Understanding Base64 Decoding, Magic Bytes, & File Reconstruction

Base64 decoding reverses binary-to-text encoding by mapping groups of four 6-bit Base64 characters back into three 8-bit binary bytes ($4 \times 6 = 24$ bits = 3 bytes). Decoded byte streams can represent UTF-8 text strings, JSON documents, or raw binary payloads such as PNG images, PDF files, or ZIP archives.

Magic Byte File Signature Inspector Table

File FormatMagic Bytes (Hex)Detected MIME Type
PNG Image89 50 4E 47 0D 0A 1A 0Aimage/png
JPEG ImageFF D8 FFimage/jpeg
GIF Image47 49 46 38image/gif
PDF Document25 50 44 46 (%PDF)application/pdf
ZIP Archive50 4B 03 04 (PK..)application/zip

100% Local Browser Privacy & Security

Base64 strings often contain sensitive payload data or private tokens. Our decoder runs 100% locally in your web browser using JavaScript Web Workers. Zero tokens, files, or payload data leave your machine.

Frequently Asked Questions

What is Base64 decoding?

Base64 decoding converts 64-character ASCII strings back into their original binary, hexadecimal, JSON, or UTF-8 text representation by performing bitwise 6-bit to 8-bit chunk reconstruction.

How does Magic Byte file signature detection work?

When binary data is decoded from Base64, our tool inspects the initial header bytes (magic numbers). For example, 0x89504E47 identifies a PNG image, 0xFFD8FF identifies a JPEG, 0x25504446 identifies a PDF, and 0x504B0304 identifies a ZIP file.

Can I decode Data URIs (data:image/png;base64,...)?

Yes! Our decoder automatically extracts the MIME type and raw payload from any Data URI scheme string and renders a live preview of the underlying image or file.

How does the JWT Token Inspector work?

When a 3-part dot-separated JWT token is detected, our decoder splits the Header, Payload, and Signature, rendering color-coded cards and human-readable dates for token claims.

Can I decode Base64URL strings without padding?

Yes! Base64URL (RFC 7515) replaces "+" with "-" and "/" with "_". Our decoder automatically normalizes character variations and appends missing "=" padding characters.

What happens if my Base64 string contains invalid characters?

Our tool performs strict character validation and displays the exact character token and index position of any illegal symbol.

Is my decoded file or data uploaded to any server?

No. 100% of decoding, magic byte inspection, and media reconstruction runs locally inside your web browser using JavaScript Web Workers. Zero files or data leave your machine.

Can I download reconstructed images or PDFs?

Yes. Click the "Download Reconstructed File" button to save the binary payload directly to your computer.

What is the 6-bit to 8-bit Bit Matrix visualizer?

The Bit Matrix visualizer breaks down how four 6-bit Base64 characters (24 bits) are grouped and converted back into three 8-bit binary bytes.

What formats can I export the output as?

You can export output as Plain Text (UTF-8), Pretty-Printed JSON, Hex Offset Grid Dump, or raw binary files (.png, .jpg, .pdf, .zip).

Related Encoding & Decoding Tools

Related Guides