Base64 Encoder / Decoder
Encode any string to Base64 — or decode a Base64 string back to its original text. Used in URLs, basic auth, data: URIs, JWTs, email attachments, and just about everywhere data needs to travel as text.
Saisir
Sortir
How to use the Base64 Encoder/Decoder
Paste text or a Base64 string. Choose encode or decode. The output appears in real time. Use the URL-safe variant when you need to embed in a URL or JWT — it swaps “+/” for “-_” and drops trailing “=”.
Pourquoi cet outil est important
Base64 lets binary data travel through systems that only handle text — email, URLs, JSON, XML, environment variables. Every modern API touches Base64: JWT tokens contain three Base64-url segments, basic auth headers are “Basic
Cas d'utilisation courants
- Decoding the payload of a JWT token
- Creating data: URIs to inline small images in CSS
- Encoding credentials for HTTP Basic Auth
- Generating Base64-encoded values for webhook payloads
- Decoding email attachments quoted in raw message source
- Encoding binary parameters for URL query strings
Standard Base64 vs. URL-safe (Base64Url)
Standard Base64 uses A-Z, a-z, 0-9, +, /, and = padding. URL-safe Base64 (Base64Url, defined in RFC 4648) replaces + with -, / with _, and drops trailing =. JWTs and modern web APIs use URL-safe. Most older systems use standard. Always check what your destination expects.
Foire aux questions
Is Base64 encryption?
No. Base64 is encoding — anyone can decode it. Never use Base64 to “hide” sensitive data. Use encryption (AES, RSA) for security.
Why is the output 33% larger?
Base64 represents every 3 bytes of binary as 4 ASCII characters. The size increase is inherent to the format. Use compression (gzip) before Base64-encoding if size matters.
What\u2019s the difference between btoa and Base64?
`btoa` is the browser\u2019s built-in Base64 encoder but only handles ASCII. Our tool wraps it with UTF-8 handling so emoji, accented characters, and non-Latin scripts encode correctly.
Can I encode files with this?
No — this tool handles strings only. For file encoding (image to data: URI, PDF to attachment), use a dedicated file-input tool or run `base64 -i file` in your terminal.
Building a marketing stack that depends on clean API integrations?
Riman Agency builds martech and integration architectures.
