Encode text or files to Base64 or decode Base64 back to text. Supports image preview, data URL output, and one-click direction swap — nothing sent to a server.
Enter text or a file above and click Encode / Decode
Base64 converts bytes into a safe text alphabet of 64 characters. It is useful when binary content must pass through JSON, HTML, CSS, email, or another text-only channel.
Base64 is not encryption. Anyone can reverse it, and encoded data is about one third larger than its original byte sequence.
const encoded = btoa("Hello");
const decoded = atob(encoded);
import base64
base64.b64encode(b"Hello").decode()
Unicode text must first become UTF-8 bytes. This tool handles that conversion automatically and keeps all processing local to your browser.
This tool is provided for general informational and utility purposes only. Results may be inaccurate, incomplete, outdated, or contain errors. Always verify results before relying on or using them.
Some tools may use AI, automated processing, third-party services, or server-side processing. Do not rely on these tools as a substitute for professional advice.
Use at your own risk. BestToolOnline makes no guarantees regarding the accuracy, reliability, completeness, availability, or suitability of results, to the maximum extent permitted by applicable law.
See our Terms of Service and Privacy Policy for complete details.