{{ h }}
Base 64 encoding converts binary data into an ASCII-only string by mapping every three input bytes to four readable characters. The scheme was designed for email and XML systems that reject non-text bytes, yet it now underpins image embedding, data URIs, and token generation across many protocols.
This tool accepts plain text or an entire file, splits the incoming bytes into 24-bit blocks, and emits their Base 64 representation. Optional switches let you remove “=” padding, use URL-safe symbols, or wrap lines at 64 characters; instant copy, download, and a local history streamline repetitive tasks.
For example, a developer embedding a small SVG icon in CSS can drop the file, select the URL-safe toggle, and paste the result directly into a `background-image` rule, ensuring cross-browser portability without external requests.
Base 64 treats the input as a stream of eight-bit octets (b0…bn). It concatenates them into 24-bit chunks, re-segments each chunk into four six-bit indices, then looks up those indices in the 64-character alphabet. Padding bytes ensure the final block reaches 24 bits, preserving round-trip reversibility.
The default alphabet is A–Z
, a–z
, 0–9
, +
, /
. The URL-safe variant substitutes -
for +
and _
for /
.
Option | Effect |
---|---|
Standard | Uses “+” and “/”, adds “=” padding. |
URL-safe | Replaces symbols to avoid reserved URL bytes. |
No padding | Omits trailing “=”, reducing length. |
Wrapped | Inserts newline every 64 characters for e-mail bodies. |
Padding guarantees the output length is a multiple of four; removing it shortens tokens but may break strict decoders.
Encoding “Hello”:
Concept formalised in RFC 4648, building on MIME Base 64 definitions from RFC 2045 and privacy-enhanced mail standards.
No personal data leaves the browser, simplifying GDPR alignment.
Follow these steps to transform any text or file into a shareable Base 64 string.
All processing happens locally; nothing is uploaded or logged.
Omitting “=” shortens tokens for URLs where trailing symbols are trimmed; ensure the receiver supports this variant.
It swaps “+” and “/” with “-” and “_” so the string remains safe inside paths and query parameters.
The last ten encodings persist in browser storage until you clear them or purge site data.
No. Newlines are ignored by compliant decoders and serve only for readability in emails or console logs.