Base64 Decode
Decode Base64 strings to plain text safely.
Example
- In:
- SGVsbG8sIENlcnRvZmxvdyE=
- Out:
- Hello, Certoflow!
Paste a Base64 string to decode to plain text.
Guide
Introduction
Base64 strings appear in log files, database columns, JWT segments, and legacy XML <Content> nodes — often without context about what they contain. Decoding transforms the opaque alphabet soup back into readable UTF-8 text so you can inspect credentials, JSON fragments, error payloads, and configuration blobs without writing a one-off script.
Certoflow's Base64 Decode validates input structure before attempting conversion. Malformed strings produce explicit errors instead of mojibake that sends debugging down the wrong path for twenty minutes.
What this tool does
Paste a Base64 string (with or without whitespace line breaks). Click Decode to receive UTF-8 text output. The validator checks:
- Character set compliance (A–Z, a–z, 0–9, +, /, padding)
- Length divisibility by four
- Successful binary-to-text conversion
Toolbar controls support paste, copy decoded output, load examples, and clear.
How it works
- Strip whitespace from input (PEM-style wrapping tolerated).
- Validate charset and padding rules.
atob()→ byte array →TextDecoderwith UTF-8.- Display result or surface a specific error message.
The pipeline mirrors what production decoders should implement — fail fast on invalid input rather than returning partial garbage.
Validation example
| Input | Result |
|---|---|
SGVsbG8= | Hello |
SGVsbG8sIENlcnRvZmxvdyE= | Hello, Certoflow! |
SGVsbG8 (bad padding) | Error: invalid Base64 |
SGVsbG8! (illegal char) | Error: invalid Base64 |
Real-world examples
Debugging a misconfigured webhook
A SaaS integration stores Base64 event payloads:
eyJldmVudCI6InBheW1lbnQiLCJhbW91bnQiOjQ5OTk=
Decode locally to confirm JSON structure before opening a vendor support ticket.
Inspecting Basic auth from HAR exports
Browser HAR files capture:
Authorization: Basic dXNlcjpwYXNzd29yZA==
Decode to verify which credentials the frontend actually sends — not which credentials you intended.
Recovering text from copied API responses
Mobile apps sometimes return:
{ "note": "VGhpcyBpcyBpbml0aWFsIGRlc3RpbHQgdGV4dA==" }
Decode the note field without spinning up Postman scripts.
Email MIME part inspection
Quoted-printable and Base64 MIME bodies in .eml files often need quick decoding during spam or phishing analysis in isolated VMs.
Common mistakes
Decoding binary data as text. Image, PDF, and gzip Base64 decode to non-printable bytes. Use Base64 to Image for visual formats or a hex dump tool for opaque binary.
Ignoring URL-safe alphabet. JWT uses - and _. Replace with + and / before standard decoding, or use a URL-safe aware decoder.
Assuming Latin-1 output. Always interpret decoded bytes as UTF-8 unless you know the source used a legacy encoding.
Pasting data URI prefixes. Strings starting with data:text/plain;base64, need prefix removal. This text decoder expects raw Base64; image data URIs belong in Base64 to Image.
Trusting decoded content. Base64 provides no integrity check. Treat decoded output as untrusted input — especially in security investigations.
When decoding fails: diagnostic checklist
- Count characters — length must be divisible by four after whitespace removal.
- Check for URL-safe characters (
-,_). - Verify you copied the complete string (truncation is common in chat apps).
- Confirm the source encoded text, not compressed or encrypted binary.
- Try adding padding
=to length mod 4 equals zero.
Use cases
| Situation | Benefit |
|---|---|
| Incident response | Quick payload inspection offline |
| QA reproduction | Decode production samples in sandbox |
| Learning JWT structure | Understand middle segment encoding |
| Legacy system maintenance | Decode config from Windows INI/XML |
| Pair programming | Share decodable examples without shell |
Related tools in the encoding cluster
Encode again with Base64 Encode to verify round-trip fidelity. Translate decoded bytes to hex with Hex Converter for byte-level inspection. Convert decoded numeric strings through Binary Translator when debugging bit-level protocols.
Platform-specific decoding quirks
| Platform | Gotcha |
|---|---|
JavaScript atob() | Returns Latin-1 string — wrap with UTF-8 TextDecoder |
Python base64.b64decode | Returns bytes — decode with .decode('utf-8') |
.NET Convert.FromBase64String | Returns byte[] — use Encoding.UTF8.GetString |
PostgreSQL decode(col, 'base64') | Returns bytea — cast explicitly for text |
When production decoders fail but this tool succeeds, compare alphabet variants (standard vs URL-safe) and padding policies between environments.
Logging safely during decode sessions
Decoded output may contain credentials, PII, or session tokens. Clear the tool after debugging. Do not screenshot decoded secrets into ticket systems. Certoflow processes locally, but your clipboard persists decoded text until overwritten.
Handling partial strings from logs
Log aggregation systems truncate long Base64 fields. If decode fails after copying from Kibana or CloudWatch, retrieve the full value from raw log storage or request body capture. Partial strings fail padding validation deliberately — never strip validation to force decode of incomplete data.
Summary
Base64 Decode is the fastest path from opaque encoded strings to readable text when you cannot open a terminal or when company policy keeps debugging entirely in the browser. Validation-first design prevents the false leads that unvalidated decoders create.
Frequently Asked Questions
- Why does decoding fail with 'Invalid Base64'?
- Common causes include URL-safe variants (- and _) without conversion, missing padding, line breaks inside the string from email wrapping, or non-Base64 characters copied accidentally.
- Can this decode Base64 image data?
- This tool decodes to text. If your Base64 represents an image, use the Base64 to Image tool to render a visual preview instead.
- What about URL-safe Base64?
- Standard Base64 uses + and /. URL-safe variants replace them with - and _. Replace those characters before decoding, or use a URL-safe decoder if you frequently handle JWT segments.
- Does whitespace matter?
- The decoder strips whitespace before processing, so PEM-style line breaks generally do not break decoding.
- Is my Base64 data stored?
- No. Decoding is performed entirely client-side with no server round trip.
Related Tools
Continue with these related utilities.
Base64 Encode
Encode text to Base64 with UTF-8 support.
Developer ToolsBase64 to Image
Preview images from Base64 strings instantly.
Developer ToolsImage to Base64
Convert images to Base64 in the browser.
Developer ToolsHex Converter
Convert text, hex, and decimal in both directions.
Developer ToolsBinary Translator
Convert text to binary and binary to text.