How to encode text to Base64
- Type or paste your text into the left box β encoding happens live.
- Tick URL-safe if the result goes into a URL, filename or JWT.
- Click Copy output. Use β Swap to instantly decode what you just encoded.
Where developers use Base64 every day
- HTTP Basic Auth β
Authorization: Basic base64(user:password) - Data URIs β embedding small images or fonts directly in CSS and HTML
- JSON Web Tokens β JWT header and payload are URL-safe Base64
- Email attachments β MIME encodes binary attachments as Base64
- Config & env values β storing binary data in text-only formats like YAML and Kubernetes secrets
Frequently asked questions
What is Base64 encoding used for?
Base64 represents binary or text data using only 64 safe ASCII characters. Developers use it daily for HTTP Basic Auth headers, data URIs, JSON Web Tokens, email attachments and storing binary blobs in text-only systems.
Does this handle emoji and international characters?
Yes. Input is encoded as UTF-8 bytes first, so emoji, accents, Chinese, Arabic and any other Unicode text round-trips correctly β unlike naive btoa() which throws on non-Latin characters.
What is URL-safe Base64?
Standard Base64 uses + and / which have special meaning in URLs. The URL-safe variant replaces them with - and _ so the encoded string can be used in query strings and file names.
Is Base64 encryption?
No β Base64 is an encoding, not encryption. Anyone can decode it instantly. Never use Base64 alone to protect secrets.