Decode Base64 to text and files instantly. Decode data URIs, email attachments, and Base64-encoded data. Supports URL-safe Base64 decoding and automatic file type detection. Perfect for developers working with data URIs, API responses, and embedded content.
Automatically detect and preview images from Base64 data URIs. View decoded images directly in the browser.
Download decoded files (images, PDFs, documents) with correct file extensions and MIME types.
Everything runs locally in your browser. Your Base64 data never leaves your device.
Paste your Base64 string, configure options, and get decoded output.
Convert - and _ to + and /.
Remove data:[mime];base64,
Privacy-first
All decoding happens locally. No uploads.
Understanding how Base64 decoding converts encoded strings back to original data
Base64 decoding is the reverse process of Base64 encoding. It converts Base64-encoded strings (which use 64 ASCII characters: A-Z, a-z, 0-9, +, /) back into their original binary or text format. When decoding Base64, the tool reverses the encoding process: it takes the Base64 characters, converts them back to bytes (each 4 Base64 characters represent 3 bytes), and then decodes those bytes to text or binary data.
When you decode Base64, the tool groups Base64 characters into sets of four (representing 24 bits total), converts each 6-bit group back to its original byte value, and reassembles the bytes into the original data. If padding characters (=) are present, they indicate how many bytes were in the final group during encoding. The decoded data can be text, images, PDFs, or any binary file.
SGVsbG8gV29ybGQh
16 bytes (Base64-encoded)
Hello World!
12 bytes (original text)
The decoding process reverses Base64 encoding: it groups Base64 characters into sets of four (representing 24 bits total), converts each 6-bit group back to its original byte value, and reassembles the bytes into the original data. For text data, bytes are decoded using UTF-8 encoding. For binary data (images, PDFs, etc.), bytes are preserved as-is for file download.
URL-safe Base64 uses - and _ instead of + and / to avoid URL encoding issues. When decoding URL-safe Base64, these characters must be converted back to + and / before standard Base64 decoding. This tool automatically detects and handles URL-safe Base64 encoding, making it easy to decode tokens, API responses, and other URL-safe Base64 strings.
Base64 encoding and decoding are perfect inverses. Any data encoded to Base64 can be decoded back to its original form without loss. This makes Base64 ideal for transmitting binary data as text, but remember: Base64 is encoding, not encryptionโanyone can decode it.
Common use cases where Base64 decoding reveals original data
Decode Base64-encoded images from data URIs in HTML or CSS. Extract and view images that were embedded inline, or download them as separate image files.
Decode Base64-encoded email attachments. Email systems encode binary attachments in Base64, requiring decoding to access the original files.
Decode Base64-encoded data from API responses. Some APIs encode binary data or text in Base64 for transmission, requiring decoding to access the actual content.
Decode Base64-encoded data passed through URL query parameters. Extract and view data that was encoded for safe URL transmission.
Decode Base64-encoded data stored in text database columns. Some databases store binary data as Base64 strings, requiring decoding to access the original files.
Recover files from Base64-encoded strings. Decode images, PDFs, documents, or any binary file that was encoded to Base64 for transmission or storage.
Everything you need to know about Base64 decoding
Paste your Base64 string into the input field, enable auto-detection options if needed, and click Decode. The tool will decode the Base64 string to text or binary data that you can view, copy, or download.
Base64 decoding converts Base64-encoded strings back to their original format (text, images, files, or binary data). The process reverses Base64 encoding, converting ASCII characters back to bytes and then to the original data.
Yes. If your Base64 string contains image data (from a data URI or image encoding), the tool will detect it and allow you to preview or download the image. The tool automatically detects image MIME types from data URI prefixes.
Yes. The tool can auto-detect URL-safe Base64 encoding (which uses - and _ instead of + and /). Enable the auto-detect option to automatically convert URL-safe Base64 to standard Base64 before decoding.
If the Base64 string contains binary data (images, PDFs, etc.), the tool will detect it and allow you to download it as a file. For images, you can preview them directly in the browser. The tool automatically detects the file type from data URI prefixes.
No. All decoding happens locally in your browser using JavaScript. Your Base64 data never leaves your device and is not uploaded to any server.
If your Base64 string starts with 'data:[mime];base64,', enable the auto-remove prefix option. The tool will automatically strip the prefix before decoding and detect the MIME type for proper file handling.
Base64 strings must only contain A-Z, a-z, 0-9, +, /, and = characters (or - and _ for URL-safe). Invalid characters, incorrect padding, or truncated strings will cause decoding errors.
Yes. Base64 can encode any file type, and this tool can decode any Base64-encoded data back to its original format: images, PDFs, documents, text files, binary files, and more.
Base64 decoding is a reversible encoding processโanyone can decode Base64 instantly. Decryption requires a secret key and is used for security. Base64 is encoding, not encryption. Never use Base64 alone for security.
Yes. This tool uses UTF-8 decoding after Base64 decoding, correctly handling emoji, accented characters, Chinese/Japanese text, and all Unicode symbols in decoded text.
This tool is perfect for testing, debugging, and one-off decoding. For production apps with high volume, integrate Base64 decoding directly into your codebase using native libraries (Buffer in Node.js, atob in browsers, base64 module in Python) for better performance.
Explore tutorials on Base64 encoding/decoding, data URIs, API authentication, and web development best practices.
Explore learning centerMore tools to work with Base64 and data encoding
Encode text and files to Base64 format. Create data URIs for images, email attachments, and API authentication strings.
Encode JSON data specifically to Base64. Perfect for JWT token payloads and JSON-based API authentication.
Decode Base64-encoded JSON data. Perfect for viewing JWT token payloads and API responses.