Validate and Inspect Base64
Paste any Base64 to get a full inspection report — encoding, padding, decoded size and detected file type — with one-click fixes for common problems.
ⓘ Nothing to convert yet
Nothing to convert yet — paste your data or drop a file to begin.
Inspection Report
- Detected Type
- —
- MIME Type
- —
- Encoding
- —
- Input Length
- —
- Decoded Size
- —
- Padding Status
- —
- Data URI
- —
- File Signature
- —
- Preview Availability
- —
How to validate and inspect Base64
To validate Base64, paste the string into the tool above. It reports whether the data is valid, which encoding variant it uses, whether the padding is correct, how large the decoded content is, and what kind of file the bytes appear to be. Common problems like missing padding can be fixed with one click — all inside your browser.
How to Use
- Paste the Base64 string you want to check into the input box.
- Read the report: validation status, encoding type, padding, length, decoded size and Data URI detection.
- If the data is valid, the inspector shows what it contains — detected file type, MIME type and file signature from the actual bytes.
- If something is wrong, the report names the exact problem; use the one-click fix where offered.
- Found URL-safe characters? The report says so and points you to the right next step.
Real Example
A healthy input produces a report like: Valid Base64 — Encoding: Standard Base64, Padding Status: Correct, Input Length: 327,680 chars, Decoded Size: 245.7 KB, Detected Type: PNG image, MIME: image/png. A broken one produces something just as specific: Invalid Base64 — Problem: Missing padding; Detected: Base64URL characters; Suggested fix: convert "-" and "_" to standard characters and add the missing padding — with a Fix Automatically button that does exactly that.
Code Snippets
// Strict Base64 check (browser) — throws on invalid input
function isValidBase64(s) {
try {
return btoa(atob(s)) === s.replace(/=+$/, '') + '='.repeat((4 - (s.length % 4)) % 4 || 0) || btoa(atob(s)) === s;
} catch { return false; }
}How the Validator Works
Most validators answer one question — valid or not — and stop. Real debugging needs more. This inspector checks the Base64 alphabet and structure, distinguishes standard from URL-safe encoding, verifies that padding is present and correct, and measures the true decoded size. For valid data it goes further: it reads the leading bytes of the decoded content and matches them against known file signatures — PDF (%PDF-), PNG, JPEG, GIF, WebP — so you learn what the data actually is, not what a label claims it is. That distinction matters, because a Data URI prefix can say anything.
Common Use Cases
- Debugging "invalid Base64" errors from an API or library.
- Checking a payload before sending it to a system that decodes it strictly.
- Identifying what kind of file a mystery Base64 blob contains.
- Auditing data copied from logs, emails or config files for hidden corruption.