About Base64 encoding
Base64 encoding converts any text or binary data into a string built from 64 safe ASCII characters, so it can be embedded in JSON, YAML, XML, HTML, HTTP headers, and email without corruption. Every 3 bytes of input become 4 characters of output, which makes the result roughly 33% larger than the original.
Typical encoding jobs for developers and DevOps engineers: creating values for Kubernetes
Secret manifests, building Authorization: Basic headers, embedding images as
data URIs, storing binary certificates in CI/CD secret variables, and preparing MIME email
attachments. For URL or JWT contexts, enable URL-safe mode under Options —
or use the dedicated Base64URL encoder.
Encoding gotchas this tool avoids
- Trailing newlines:
echo "value" | base64silently encodes an extra\n. This tool encodes exactly what you type. - Unexpected line wrapping: the Linux
base64command wraps output at 76 characters by default, which breaks single-line consumers. Here, wrapping is off unless you enable the MIME option. - Unicode mishandling: naive JavaScript
btoa()throws on emoji and non-Latin text. This tool encodes proper UTF-8 by default, sodéjà vu 🚀just works.