Text & Code
Base64 Text Encoder / Decoder
Encode text to Base64 and decode Base64 back to text. URL-safe mode available.
Your files stay on your device - processed locally via WebAssembly, never uploaded
🔒 All encoding and decoding happens in your browser. Nothing is sent anywhere.
Embed this tool on your website
Copy this code to add the Base64 Text Encoder / Decoder to your site for free. It runs entirely in your visitors' browsers - no API key, no usage limits.
<iframe src="https://optipix.art/embed/base64-text" width="100%" height="600" style="border:1px solid #e4e4e7;border-radius:8px;" title="Base64 Text Encoder / Decoder by OptiPix" loading="lazy"></iframe> <p style="font-size:12px">Free tool by <a href="https://optipix.art/base64-text">OptiPix Base64 Text Encoder / Decoder</a></p>
❤️ Love this tool? Support our team.
No ads, no tracking, no limits. Tips keep 104 tools free for everyone.
Secure payment via Stripe · No account needed
About Base64 Text Encoder / Decoder
Last updated: June 2026
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
You Might Also Like
If you find Base64 Text Encoder / Decoder useful, check out these related tools: URL Encoder / Decoder, Text to Binary / Hex / Octal, and Hash Generator. All tools run entirely in your browser with no uploads or signups required.
Explore more: Browse all tools · Step-by-step guides · Tips & tutorials · Compare tools
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.