Text & Code
Base64 Text Encoder / Decoder
Encode text to Base64 and decode Base64 back to text. URL-safe mode available.
๐ All encoding and decoding happens in your browser. Nothing is sent anywhere.
โ Love this tool? Support the developer.
100% free โ no ads, no limits. Your support keeps every tool free.
Secure payment via Stripe ยท No account needed
About Base64 Text Encoder / Decoder
OptiPix Base64 Text Encoder/Decoder converts between plain text and Base64 encoding directly in your browser. Encode any UTF-8 text to Base64, or decode Base64 strings back to readable text. Toggle URL-safe Base64 mode to use - and _ instead of + and / for URL and filename compatibility. Enable live mode for real-time conversion as you type. See input/output size stats showing the encoding overhead. Drop any file to encode its bytes to a Base64 string, or paste a Base64 string to decode and download as a file. This tool handles text and arbitrary files โ for image-specific Base64 with preview and CSS output, see the Image to Base64 tool. All processing happens locally in your browser.
How It Works
The tool uses JavaScript's btoa() and atob() functions for ASCII-range text. For full UTF-8 support, it first encodes the text using TextEncoder, then converts the byte array to a Base64 string. URL-safe mode swaps + for - and / for _ in the output.
Use Cases
- โขEncode API keys and tokens for configuration files
- โขDecode Base64-encoded data from APIs and JWTs
- โขConvert files to Base64 for embedding in JSON payloads
- โขPrepare data for email MIME encoding
- โขDebug Base64-encoded strings in web applications
Frequently Asked Questions
What is Base64 encoding?
What is URL-safe Base64?
Can I encode files, not just text?
How is this different from the Image to Base64 tool?
Is my data sent to any server?
Related Tools
URL Encoder / Decoder
Encode and decode URLs with percent-encoding. Parse URLs into components.
Text to Binary / Hex / Octal
Convert text to binary, hexadecimal, octal, and decimal โ and back.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text or files.
Case Converter
Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, and 10+ more formats.