Calcorithmevery number has an answer
πŸ”
All tools β†’
← Generators

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 strings back to plain text.

Plain text

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that converts binary data (images, files, arbitrary bytes) into a string of 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /. It was designed to safely transmit binary data over systems that only handle text β€” email protocols (SMTP), HTML data URIs, and JSON payloads. Base64 is not encryption: it is reversible by anyone and should never be used to hide sensitive data.

Base64 character set (64 chars + padding): A-Z = 0–25 (uppercase letters) a-z = 26–51 (lowercase letters) 0-9 = 52–61 (digits) + = 62 / = 63 = = padding character Encoding process: Input bytes grouped in 3s β†’ 24 bits β†’ split into four 6-bit values β†’ each 6-bit value maps to one of the 64 characters Size overhead: Base64 is 33% larger than the original binary e.g. 3 bytes β†’ 4 characters (3/4 = 75% efficiency)

Base64 vs. Base64URL

Standard Base64 uses + and / characters, which are special characters in URLs. Base64URL is a URL-safe variant that replaces + with - and / with _, and omits = padding. Base64URL is used in JWTs, OAuth tokens, and any context where the encoded string appears in a URL.

Standard Base64: "SGVsbG8+V29ybGQ=" (+ and / may appear) Base64URL: "SGVsbG8-V29ybGQ" (- instead of +, _ instead of /, no =) Used in: Standard Base64: email attachments, data URIs (<img src="data:image/png;base64,...">) Base64URL: JWTs, OAuth codes, URL parameters

Common Base64 use cases

Email attachments
MIME encoding embeds binary files (PDFs, images) as Base64 text within email messages
HTML data URIs
Embed small images directly in HTML/CSS without a separate HTTP request: src="data:image/png;base64,..."
API authentication
HTTP Basic Auth sends "username:password" as Base64 in the Authorization header
JSON payloads
Binary data (images, files) embedded in JSON must be Base64-encoded since JSON is a text format
JWT tokens
All three parts of a JWT are Base64URL-encoded, making the token a printable ASCII string
Cryptographic keys
PEM-format SSL/TLS certificates and SSH keys are Base64-encoded DER binary data

Frequently asked questions

What is Base64 actually used for?

It encodes binary data as plain ASCII text so it can travel safely through text-only systems β€” embedding images in CSS/HTML data URIs, encoding email attachments, and carrying binary data inside JSON.

Is Base64 a form of encryption?

No. Base64 is encoding, not encryption β€” anyone can decode it instantly. Never use it to protect passwords or sensitive data.

Why is Base64 output larger than the input?

Base64 represents every 3 bytes as 4 characters, so the encoded result is about 33% larger than the original binary data.

Is my data uploaded anywhere?

No. Encoding and decoding run locally in your browser, so the text you enter never leaves your device.

What this tool does

Encodes plain text to Base64 format or decodes Base64 strings back to plain text. Base64 is used to safely transmit binary data or special characters over systems that only handle ASCII text.

Input fields explained
Mode
Encode: converts plain text to Base64. Decode: converts Base64 back to plain text. Invalid Base64 will show an error.
Text area
In Encode mode, enter your plain text. In Decode mode, paste a Base64 string (uses characters A–Z, a–z, 0–9, +, / and = padding).
πŸ’‘ Tips & context
β†’Base64 increases data size by ~33%. A 3-byte input becomes 4 Base64 characters.
β†’Common uses: embedding images in HTML as data URIs, encoding email attachments, storing binary data in JSON.
iFormula / How it works

3 bytes input β†’ 4 Base64 characters. Output ~33% larger than input.

Related Generators tools

Password Generator
Generate strong, random and secure passwords of any length
UUID Generator
Generate unique identifiers
Color Generator
Generate random color palettes with HEX, RGB and HSL codes
Lorem Ipsum
Generate Lorem Ipsum placeholder text in paragraphs, sentences or words
QR Code Generator
Generate QR codes for any URL
Random Number
Generate a random number within any range you choose
Username Generator
Generate creative, available username ideas for any platform
Hash Generator
Generate MD5, SHA-1 and SHA-256 hashes from any text