Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 back to text.

By Konstantin Iakovlev · Updated April 2026 · Source: IETF

Mode

Result

SGVsbG8sIFdvcmxkIQ==

Details

Input Characters13
Output Characters20
Input Size13 bytes
Output Size20 bytes

Use the Base64 Encoder/Decoder above to calculate your results. Enter your values and see instant results — all calculations run in your browser.

Disclaimer: This calculator is for informational purposes only and does not constitute tax, financial, or legal advice. Results are estimates based on the information you provide and current rates. Always consult a qualified tax professional or financial advisor for advice specific to your situation.

How It Works

Base64 is an encoding scheme that represents binary data using a limited set of printable text characters. The reason it remains everywhere in 2026 is practical: many transport mediums were built to carry text, not arbitrary bytes. Email attachments, web API payloads, and images embedded directly inside HTML documents all lean on it to move binary content through text-only channels without corruption.

Encoding works in fixed groups. Three bytes of input form 24 bits, which split evenly into four 6-bit blocks, and each block maps to one character from the Base64 alphabet of A-Z, a-z, 0-9, plus the symbols + and /. When the input length is not a multiple of three, padding characters (=) fill the gap. Decoding simply runs the chain backward, translating each character into its 6-bit value, regrouping those bits into 8-bit bytes, and reconstructing the original data.

Two details trip people up. First, encoded output runs roughly 33% larger than the source, so it has a real cost in bandwidth and storage that matters at scale. Second, the alphabet is not universal: standard Base64 uses + and /, while the URL-safe variant swaps them for - and _. Mixing the two is one of the most frequent causes of failed decodes in API integrations, so confirm both ends agree on the character set before sending anything across the wire.

Decoding an API Key

  1. 1 Input: 'U2VjcmV0QVBJS2V5MjAyNkFGVEhJU0lTQ09ERURVU0VSRk9SQVBJIQ=='
  2. 2 The calculator will process the Base64 string, converting each character back to its 6-bit representation, then grouping these bits into 8-bit bytes. Padding characters ('=') will be removed during this process.
  3. 3 Result: 'SecretAPIKey2026AFTERTHISISCODEDUSERFORAPI!'
  4. 4 This decoded string represents a hypothetical API key for a 2026 service. In real-world scenarios, developers often encode API keys or other sensitive data in Base64 before transmitting them in HTTP headers or configuration files to avoid issues with special characters and ensure safe transport.

Source: IETF · Last updated: April 2026

Frequently Asked Questions

What is Base64 encoding used for?
Base64 encodes binary data as ASCII text so it can be safely transmitted in text-based formats like email, JSON, URLs, and HTML. It is commonly used for embedding images in CSS/HTML and encoding API authentication tokens.
Does Base64 encoding provide security?
No. Base64 is an encoding, not encryption. Anyone can decode Base64 text instantly. Never use Base64 to protect sensitive data like passwords or API keys. Use proper encryption (AES, RSA) for security.
Why does Base64 make data larger?
Base64 increases data size by approximately 33% because it converts every 3 bytes of binary data into 4 ASCII characters. This tradeoff is accepted because the encoded data is safe for text-based transport.