Base64 Encode / Decode (Free)
Encode UTF-8 text to Base64 or decode Base64 back to readable text in your browser. You can also turn a local file into Base64. Copy the result, clear the form, and keep everything on your device. Files above 5 MB are refused to keep the tab responsive.
Base64 is encoding, not encryption. Files are read locally with FileReader and never uploaded.
How to encode and decode Base64 safely
Paste plain text and press Encode to Base64 to produce the standard Base64 string. Paste Base64 and press Decode to text to read it again. The copy button writes the result to your clipboard, and Clear empties the input, output, and file picker. The file option reads a local file as bytes and encodes those bytes, which is useful for small images, fonts, or configuration blobs that must travel inside a text field. Files larger than 5 MB are refused because Base64 adds roughly one third to the size and the work happens on the page's main thread.
Base64 is an encoding, not encryption. It makes binary data safe to move through systems that expect text, and anyone can reverse it without a key. Never treat Base64 as protection for passwords, API tokens, or personal data. If you need secrecy, use encryption such as AES-GCM through the Web Crypto API; if you need a password verifier, use a deliberately slow password hash rather than any general-purpose encoding.
Text is converted to UTF-8 bytes before encoding, so accented letters, emoji, and non-Latin scripts survive the round trip. Decoding expects the bytes to be valid UTF-8; a Base64 string that represents arbitrary binary data may be rejected as text. Whitespace and missing padding are tolerated on decode, but characters outside the standard A-Z, a-z, 0-9, +, and / alphabet are rejected. URL-safe Base64 uses - and _ instead of + and /, so convert those characters first if you copied a token from a URL or JWT.
All work happens locally with the browser's TextEncoder, TextDecoder, btoa, atob, and FileReader functions. The tool does not upload text or files, and it does not log them. For hashing rather than encoding, use the hash generator; for checking whether a secret has leaked, use the leak checklist tool.
FAQ
Is Base64 encryption?
No. Base64 is a reversible encoding that turns bytes into printable ASCII characters. Anyone can decode it without a key, so never use it to protect passwords, tokens, or private data.
Does this tool handle Unicode text?
Yes. Encoding converts the text to UTF-8 bytes before Base64, so accented letters, emoji, and non-Latin scripts work. Decoding expects valid UTF-8 and reports an error for binary data that is not valid text.
Why does the file option stop at 5 MB?
The conversion runs in the page and Base64 makes the data about one third larger. The 5 MB cap keeps the tab responsive. For larger files, use a command-line tool such as base64 on macOS or Linux.
Can it decode URL-safe Base64?
The tool uses the standard Base64 alphabet with + and / characters. URL-safe Base64 uses - and _ instead, so convert those characters before decoding, or use a URL-safe decoder.
Are line breaks and missing padding accepted?
Yes. Whitespace is removed before decoding, and missing padding characters are added automatically. Invalid characters or an impossible length still produce an error.
Is my text or file uploaded?
No. Encoding and decoding use the browser's TextEncoder, TextDecoder, btoa, and atob functions. Files are read with FileReader and never leave your device.