About the Base64 Encode / Decode
Encode any text to Base64 or decode Base64 back to readable text. Unicode and emoji are handled correctly via UTF-8, and URL-safe Base64 (Base64url) is supported.
Key features
- Encode text to Base64 and decode Base64 to text
- Full UTF-8 support: accents, non-Latin scripts and emoji
- URL-safe Base64 (Base64url) without padding
- Decoding accepts missing padding and line breaks
- Encode or decode each line separately
- Runs locally in your browser
Encode and decode Base64 text
Base64 turns any data into a string made of 64 safe characters (A–Z, a–z, 0–9, + and /). It's used to embed data in JSON, emails, data URLs, HTTP Basic authentication headers and JSON Web Tokens.
Examples
| Text | Base64 |
|---|---|
Hello | SGVsbG8= |
Hello, World! | SGVsbG8sIFdvcmxkIQ== |
café | Y2Fmw6k= |
👋 | 8J+Riw== |
Text is converted to UTF-8 bytes before encoding, which is the standard used by web APIs. That's why café and emoji round-trip correctly.
Standard vs URL-safe
| Variant | Characters 62 and 63 | Padding | Used in |
|---|---|---|---|
| Standard (RFC 4648 §4) | + / | = | Email (MIME), data URLs, most APIs |
| URL-safe (RFC 4648 §5) | - _ | Usually omitted | URLs, JWTs, file names |
The decoder accepts both variants automatically.
Common uses
- HTTP Basic auth:
Authorization: Basic+ Base64 ofuser:password(encoded, not encrypted, so always use HTTPS). - Data URLs:
data:text/plain;base64,SGVsbG8=. - JSON payloads that need to carry small binary values.
- Inspecting tokens: the parts of a JWT are Base64url-encoded JSON.
Related tools
Convert images with Image to Base64 and Base64 to Image, decode tokens with the JWT Decoder, or encode JSON with JSON to Base64.
How to use the Base64 Encode / Decode
- Type or paste your text into the input box.
- Choose the options you want.
- The result updates instantly as you type.
- Copy the output or download it as a .txt file.