Encode any text or file to Base64, or decode a Base64 string back to plain text instantly. This free online Base64 encoder supports both standard and URL-safe Base64 encoding formats (RFC 4648). Paste your text, drag and drop a file, or switch to decode mode to convert Base64 back to readable content. All processing happens entirely in your browser using native JavaScript APIs — nothing is ever uploaded to a server. Works offline, no signup required.
data: URIs, and HTML src attributes for images. It inflates data size by about 33%.
=) are appended to make the output length a multiple of 4. One = means 1 padding byte was added; == means 2 bytes. Padding is sometimes stripped in URL-safe variants.
+ and /, which are reserved characters in URLs. URL-safe Base64 (RFC 4648) replaces + with - and / with _, making it safe to include in URLs and filenames without percent-encoding. JWT tokens use URL-safe Base64 without padding.
FileReader: const reader = new FileReader(); reader.onload = e => console.log(e.target.result); reader.readAsDataURL(file); — this gives you a full data URI including the MIME type prefix. To get just the Base64 string, split on the comma: e.target.result.split(',')[1].
btoa, atob, and FileReader). No data, text, or files are ever uploaded to a server. The tool works fully offline once loaded.