Base64 Encoder / Decoder
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
- To encode: Paste or type your text in the input field and click "Encode". The Base64 representation will appear in the output.
- To decode: Paste Base64-encoded text in the input field and click "Decode". The original text will be restored.
- Click "Copy Output to Clipboard" to copy the result for use elsewhere.
Formula
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
“Hello” → SGVsbG8= (5 input chars → 8 output chars with padding)
“Hello, World!” → SGVsbG8sIFdvcmxkIQ==
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.