What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents any sequence of bytes using only 64
printable ASCII characters: A–Z, a–z, 0–9, + and
/ (with = used for padding). It exists because many protocols and file
formats — email (MIME), JSON, XML, YAML, HTML — were designed to carry text, not raw binary data.
Encoding binary content as Base64 lets it pass through these text-only channels without corruption.
The algorithm is simple: the input is read 3 bytes (24 bits) at a time, the 24 bits are split into
four 6-bit groups, and each 6-bit value (0–63) is mapped to one character of the Base64 alphabet.
For example, the word Man becomes TWFu: the ASCII bytes 77, 97 and 110 form
the bit string 010011010110000101101110, which splits into 19, 22, 5 and 46 —
the characters T, W, F and u.
How to use this Base64 converter
- To encode: type or paste any text into the Plain Text box. The Base64 result appears instantly in the right box — no button to press.
- To decode: paste a Base64 string into the Base64 box. The decoded text appears instantly on the left. Missing
=padding and stray line breaks are fixed automatically. - Copy the result with one click — as raw text, as a
data:URI, or as a ready-to-use HTTPAuthorization: Basicheader. - Open Options for UTF-8/ASCII/ISO-8859-1/UTF-16 charsets, URL-safe Base64URL output, MIME 76-character line wrapping (RFC 2045), and per-line encoding.
Base64 in DevOps and everyday engineering
If you work in DevOps, you touch Base64 daily, often without thinking about it:
- Kubernetes Secrets store every value under
data:as Base64. Decodingkubectl get secret -o yamloutput is the classic use case — our K8s Secret Decoder handles the whole manifest at once. - HTTP Basic authentication sends
user:passwordBase64-encoded in theAuthorizationheader. - JWT tokens are three Base64URL segments — decode them with the JWT Decoder.
- TLS certificates and keys in PEM format are Base64 blocks between
BEGIN/ENDmarkers. - CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins) commonly store binary files — keystores, service-account JSON,
.p12certificates — as Base64 secrets. - Data URIs embed images or fonts directly into HTML and CSS as
data:image/png;base64,….
Why use this tool instead of the command line?
You can run base64 on Linux/macOS or [Convert]::ToBase64String() in
PowerShell — but flags differ between systems (-d vs -D vs
--decode), line-wrapping defaults bite you, and Windows has no simple equivalent.
This page gives you one consistent, zero-install tool that works the same everywhere, handles
Unicode correctly, shows errors clearly, and keeps a local history of your recent conversions.
Because everything runs in your browser, it is also safe for sensitive values — unlike online
tools that send your input to a server.