Decode Base64 strings effortlessly with our Base64 Decoder. Perfect for reversing Base64-encoded data from APIs, email attachments, or browser storage. Need to encode instead? Try our Base64 Encoder. For decoding encoded URLs, use the URL Decoder, and for text decoding, the UTF8 Decoder is your go-to.
Test your APIs today!
Write in plain English — Qodex turns it into secure, ready-to-run tests.
Regular Expression - Documentation
What is Base64 Decoding?
Base64 decoding is the process of reversing Base64 encoding. Base64 is not encryption—it’s a binary-to-text encoding scheme used to represent binary data (like images, files, or Unicode strings) in an ASCII string format. Decoding converts this encoded string back to its original binary or plain text format.
How Base64 Decoding Works
Base64 encoding divides input data into 6-bit chunks and maps each chunk to a printable character using the Base64 index table. Decoding reverses this:
Identify valid Base64 characters: These include uppercase (A–Z), lowercase (a–z), numbers (0–9), +, and /.
Convert characters to binary: Each Base64 character maps to a 6-bit binary number.
Reconstruct original bytes: Group every 4 characters (24 bits) into 3 bytes (8 bits each).
Handle padding (=): Padding indicates missing data in the last chunk and is safely removed during decoding.
How to Decode Base64 in Practice
Here’s an example using JavaScript:
And in Python:
These methods decode the Base64 string "SGVsbG8gV29ybGQ=" back to "Hello World".
Use Cases of Base64 Decoding
Email Attachments: MIME encodes attachments in Base64.
API Payloads: Transmitting images, JSON, or files over text-based protocols.
Data Storage: Safely storing binary data in text files or databases.
Debugging: Inspecting JWT tokens or encoded config values.
Pro Tips
Use a UTF-8 decoder after decoding if you’re working with special characters.
Don’t confuse Base64 with encryption—it’s reversible and offers no security.
Ensure your Base64 string is clean—spaces or invalid characters will cause decoding errors.