What is Base64 decoding?
Base64 decoding converts a Base64-encoded string back into its original text or binary data. Paste your Base64 string into the tool above with Decode mode selected and the original text appears instantly. The tool handles both standard Base64 (using + and /) and URL-safe Base64 (using - and _) automatically without needing to switch modes.
How do I decode a Base64 string online?
Switch to Decode mode, paste your Base64 string, and the decoded output appears immediately. This tool handles both standard Base64 (using + and /) and URL-safe Base64 (using - and _) automatically.
Is Base64 the same as encryption?
No. Base64 is encoding, not encryption — anyone can decode it instantly using any Base64 decoder online. It only makes binary data safe for text transmission. For real security, encrypt your data with AES before encoding to Base64. Never use Base64 to hide passwords or sensitive data -- any developer can decode it in seconds using a single function call.
What is URL-safe Base64?
URL-safe Base64 (RFC 4648) replaces + with - and / with _, and removes = padding. Used in JWT tokens, OAuth, and anywhere Base64 appears in a URL. Enable it with the checkbox in Encode mode above.
How much does Base64 increase size?
By approximately 33% — every 3 bytes become 4 Base64 characters. A 100 KB image becomes ~133 KB as a Base64 string. This is the trade-off for text-safe binary transmission. The 33% overhead is acceptable in most cases since text-based formats like JSON and HTML are typically compressed during transfer anyway. Use Base64 for embedding images in HTML/CSS data URIs, encoding file attachments in email (MIME), or passing binary in JSON APIs. Base64 is also used in HTTP Basic Auth headers and in embedding fonts directly in CSS with @font-face data URIs.
How do I decode Base64 in JavaScript?
In a browser: atob(base64string). For Unicode text: decodeURIComponent(escape(atob(base64string))). In Node.js: Buffer.from(base64string, 'base64').toString('utf8'). This tool does the same thing automatically. For URL-safe Base64 in Node.js: Buffer.from(b64str, 'base64url').toString('utf8'). The tool handles both variants without extra steps. Node.js also supports: Buffer.from(data).toString('base64') for standard and Buffer.from(data).toString('base64url') for URL-safe encoding. Both methods produce RFC 4648 compliant output that can be decoded by any standard Base64 library.
How do I decode Base64 in Python?
import base64; base64.b64decode(base64_string).decode('utf-8'). For URL-safe Base64: base64.urlsafe_b64decode(base64_string). Add padding if needed: base64_string += '==' before decoding. Python's urlsafe_b64decode handles the - and _ variants. Always check for missing padding if you get a decode error in Python. Python's standard library handles both standard and URL-safe variants via base64.b64decode() and base64.urlsafe_b64decode() respectively. For very large files, use streaming Base64 encoding in Node.js to avoid loading the entire file into memory at once.
Is my data sent to a server?
No. All encoding and decoding happens in your browser using native JavaScript functions. Nothing is uploaded to Best-TempMail or any other server. All encoding and decoding uses the browser's native btoa() and atob() functions -- your data is processed entirely client-side. The browser functions btoa() and atob() work on ASCII strings -- for Unicode text, encode as UTF-8 first using TextEncoder before calling btoa().
What is the difference between Base64 and Base64URL?
Standard Base64 uses +, /, and = (padding). Base64URL replaces + with -, / with _, and omits =. Both encode the same data — the difference is only which characters are used.
Can I encode a file to Base64?
Yes — click the Encode File button in Encode mode to upload any file. The full Base64 string is shown with a Copy button. Useful for embedding images in HTML/CSS or attaching files in JSON APIs. Base64 is also used in HTTP Basic Auth headers and in embedding fonts directly in CSS with @font-face data URIs.