Base64 Encoder & Decoder
Encode text or files to Base64 and decode Base64 strings instantly. Supports UTF-8, URL-safe mode, and file encoding. All processing in your browser โ nothing sent to any server.
// What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (AโZ, aโz, 0โ9, +, /). It was invented to safely transmit binary data through channels designed for text.
Decode: Base64 chars โ 6-bit groups โ Bytes โ Original text
Size: 3 input bytes = 4 output chars (+33% overhead)
Embedding images in HTML/CSS (data URIs), JSON API payloads carrying binary data, MIME email attachments, storing binary data in text-only databases.
Replaces + with - and / with _ so the output can be used directly in URLs and filenames without percent-encoding. Common in JWT tokens and OAuth flows.
Base64 is trivially reversible and provides zero security. Never use it to protect passwords or sensitive data. Use proper encryption instead.
Any file can be Base64 encoded โ images, PDFs, fonts, audio. The encoded string can be embedded as a data URI in HTML, CSS, or JSON.