Skip to content
Developer

Base64 Encoder / Decoder

Last updated: July 11, 2026

Encode text to Base64 or decode Base64 back to plain text. Works entirely in your browser with no data sent to any server.

How to Use This Calculator

  1. To encode: Paste or type your text in the input field and click "Encode". The Base64 representation will appear in the output.
  2. To decode: Paste Base64-encoded text in the input field and click "Decode". The original text will be restored.
  3. Click "Copy Output to Clipboard" to copy the result for use elsewhere.

Formula

Characters: A–Z (0–25), a–z (26–51), 0–9 (52–61), + (62), / (63), = (padding)

Base64 encodes every 3 bytes (24 bits) of binary data into 4 ASCII characters from a 64-character set. Each 6-bit group maps to one character. Output size = input size × 4/3 (rounded up to a multiple of 4).

Examples

Example 1: Simple Text

“Hello” → SGVsbG8= (5 input chars → 8 output chars with padding)

Example 2: Longer String

“Hello, World!” → SGVsbG8sIFdvcmxkIQ==

Example 3: Real-World Use

Data URLs: Embed images in HTML/CSS using data:image/png;base64,iVBORw0KGgo... Email attachments also use Base64 via MIME encoding.

Frequently Asked Questions

Is Base64 encryption?

No. Base64 is encoding, not encryption. Anyone can decode it — there is no key. It is used to safely transport binary data as text, not to protect data.

Why does my output end with “=” signs?

The “=” character is padding to make the output a multiple of 4 characters. One or two “=” signs may appear at the end depending on the input length.

Does Base64 increase file size?

Yes, by approximately 33%. Every 3 bytes of input becomes 4 bytes of output. The trade-off is compatibility with text-only systems like email and URLs.

Is my data sent to a server?

No. All encoding and decoding happens locally in your browser using JavaScript. Your data never leaves your device.

Disclaimer: All encoding and decoding is performed locally in your browser. Base64 is not encryption and should not be used to protect sensitive data.