Text to Base64 Encoder
Convert plain text to Base64 encoded strings online. Encode any text string to Base64 format with full Unicode and special character support.
Input
Click to upload or drag and drop
Images, PDFs, text files, JSON, etc.
56 characters
About This Tool
Mode: encode
URL-Safe: No
Base64 encoding converts binary data to ASCII text, making it safe for text-based systems like JSON, XML, and URLs.
Base64 Output
Enter text to see the Base64 encoded result here.
Frequently Asked Questions
How does text to Base64 encoding work?
Your text is first converted to UTF-8 bytes, then each group of 3 bytes is converted to 4 Base64 characters using a 64-character alphabet (A-Z, a-z, 0-9, +, /).
Can I encode text with special characters?
Yes! All characters including Unicode, emojis, and special symbols are fully supported. The text is converted to UTF-8 before encoding.
Why is my encoded string longer than the original?
Base64 encoding increases size by approximately 33% because it uses 4 characters to represent every 3 bytes of data.
What's the difference between URL-safe and standard Base64?
Standard Base64 uses + and / characters which need URL encoding. URL-safe Base64 uses - and _ instead, making it safe for URLs without encoding.
Practical Examples
HTTP Basic Auth
Encode username:password for HTTP Basic Authentication headers.
Query Parameters
Safely include complex text in URL query strings.
Data Embedding
Embed text content in formats that don't support special characters.
Common Issues & Solutions
Enable URL-safe mode if the output will be used in URLs or filenames.
Very long text may produce Base64 that exceeds URL length limits (2083 chars).
If copying fails, try the Download button to save as a file.
Empty input will not produce any output - enter at least one character.