Base64 Encoder / Decoder
Encode text to Base64 and decode Base64 back to text. Supports three variants: Standard (RFC 4648), URL-safe (base64url), and MIME (RFC 2045). All computation in-browser.
Quick load:
▶ Encode — Text to Base64
◀ Decode — Base64 to Text
How to Use This Base64 Encoder/Decoder
Encoding
- Type or paste text into the left panel.
- Select a variant: Standard for general use, URL-safe for JWTs/URLs, MIME for email attachments.
- The encoded Base64 appears instantly. Click Copy to use it.
Decoding
- Paste a Base64 string into the right panel.
- The tool auto-detects the variant (Standard, URL-safe, or MIME).
- Decoded text appears instantly. If the output is binary, you'll see a hex dump instead.
When to Use Each Variant
| Variant | Characters | Best For |
|---|---|---|
| Standard | A-Z a-z 0-9 + / = | PEM certificates, data URIs, general encoding |
| URL-safe | A-Z a-z 0-9 - _ | JWT tokens, URL query params, OAuth PKCE |
| MIME | A-Z a-z 0-9 + / = | Email attachments, SMTP content |
Common Base64 Encode/Decode Examples
Need to learn how Base64 works? Read our Base64 Encoding Guide for a complete walkthrough of the algorithm, 3-byte-to-4-char conversion, and code examples in Python and JavaScript.
JWT Token Decode: Paste a JWT into the decode panel with variant "URL-safe" to inspect the header and payload. (Note: only Base64-decodes — does not verify signatures.)
PEM Certificate Inspect: Copy the Base64 body of a PEM certificate (between BEGIN and END lines) to decode the DER binary and then parse with the ASN.1 Parser.
Data URI Extract: Paste a data URI like
data:image/png;base64,... — the tool extracts and decodes the Base64 portion.Unicode / Emoji: The encoder correctly handles multi-byte UTF-8 characters and emoji via the TextEncoder API.
Related Tools
- Hash Digest — MD5, SHA-1, SHA-256, SHA-512, SM3 hash calculator
- ASN.1 DER Parser — Decode X.509 certificates from Base64 DER
- Crypto Checksum Verifier — CRC, LRC, CMAC, Retail MAC calculator
- CRC Calculator — CRC-8/16/32/64 with 17 variants