🔒 Base64 Encoder / Decoder
Convert text and files to Base64 format, Data URIs, and vice versa.
Using Base64 Encoder / Decoder
Encode text or a small file as Base64 for an API field, an email attachment test or an inline data URI, or decode a Base64 string to see what it contains.
How to use it
- For text, stay in Text Mode, type into Plain Text and click Encode →; paste a Base64 string on the right and click ← Decode to reverse it.
- Tick URL-safe when the value goes into a URL or a JWT: it uses - and _ instead of + and / and omits the = padding.
- For a file, switch to File to Base64 and choose the file. Pick Full Data URI for use in HTML or CSS, or Raw Base64 Only for an API that wants just the encoded bytes.
- Check the image preview when encoding a picture, then use Copy or Copy Base64.
Worked example
- Input and settings
- Tea ☕ (standard, then URL-safe)
- Expected result
- VGVhIOKYlQ== and VGVhIOKYlQ
Limits and common mistakes
- Base64 hides nothing: anyone can decode it, so it is not a way to protect passwords or keys.
- Encoded output is about a third larger than the original, which matters when embedding images in CSS or JSON.
- Files are limited to 25 MiB and are read entirely into browser memory.
- Text is encoded as UTF-8, so a system expecting another character set may decode accented or emoji characters differently.
Found a mismatch? Report a problem with a non-sensitive example. Read our privacy information before sharing inputs or links.
🔗 Related Tools
HTML Entity Encoder & Decoder
Encode and decode special characters, symbols, and emojis to and from standard HTML entities and Unicode hex.
URL Encoder / Decoder
Safely encode URL component query strings or decode percent-encoded URLs.
JWT Debugger & Decoder
Inspect and decode JSON Web Tokens (JWT) headers and payloads, and check expiration dates without sending tokens anywhere.
Strong Password Generator
Generate random passwords with custom length and selectable character groups.