Free Base64 Encode & Decode
Encode text or files to Base64, or decode Base64 strings back to plain text. Supports UTF-8, URL-safe mode, and file encoding — all processed in your browser.
Drop a file or
Base64 in practice: variants, size, when to use it
There are two Base64 variants you'll actually encounter. Standard Base64 (RFC 4648 §4) uses + and / in the output alphabet, plus = for padding — fine inside JSON, XML, or email, broken in URLs because all three characters have reserved meanings there. Base64url (RFC 4648 §5) swaps +→-, /→_, and often drops the padding — that's what JWTs, WebAuthn credentials, and modern APIs use. Decoding a Base64url string with a standard decoder usually fails silently or returns garbage; the tool auto‑detects both.
The size cost is fixed: encoded output is always 4/3× the input, rounded up, so 1 MB of binary becomes 1.33 MB of Base64. That's why embedding small icons as data:image/png;base64,… in CSS is fine but embedding a hero image is a mistake — you pay the size tax on every request that pulls the stylesheet, and browsers can't parallelize downloads for inline resources. As a rule of thumb: inline anything under about 2 KB, ship anything larger as a real file.
Base64 is not encryption. It's a transport encoding — designed to survive channels that mangle non‑printable bytes (SMTP, older HTTP proxies, terminal paste buffers). If you find "encrypted" credentials in Base64, they're just obfuscated; decode reveals plaintext.
Frequently Asked Questions
What is Base64 encoding?
When should I use Base64 encoding?
What is a data URI and how does Base64 relate to it?
How does Base64 work in email attachments?
What is URL-safe Base64?
Can I encode files to Base64?
Is there a size limit for Base64 encoding?
Is my data private when using this tool?
Related Tools
Explore more free tools on iFormat.io
Pretty-print, validate, and minify JSON with syntax highlighting.
Generate MD5, SHA-1, SHA-256, and other hash digests from text.
Convert JSON arrays and objects to downloadable CSV spreadsheets.
Convert YAML files to clean, formatted JSON output.
Transform JSON data into well-formed XML documents.
View, sort, filter, and search CSV files in a clean spreadsheet interface.