Encode and decode Base64 strings and files.
100% Private — Your Data Never Leaves Your Browser
All Base64 encoding and decoding is performed entirely in your browser using client-side JavaScript. No data is sent to any server, stored, or tracked.
Base64 is a binary-to-text encoding scheme defined in RFC 4648. It represents binary data using a set of 64 ASCII characters (A–Z, a–z, 0–9, +, /) with = as padding. It converts every 3 bytes of input into 4 characters of output, resulting in approximately 33% larger data. Base64 is widely used to safely transmit binary data through text-only channels like email, JSON, XML, and HTML.
Standard Base64 encoding in browsers (btoa) only works with single-byte Latin-1 characters. Our tool overcomes this limitation by first converting your text to UTF-8 bytes using TextEncoder, then Base64-encoding those bytes. During decoding, it reverses the process with TextDecoder. This means emojis (😀), accented letters (é), CJK characters (你好), and any other Unicode text are encoded and decoded correctly.
A data URI embeds data directly in a document using the format data:[mediatype][;base64],<data>. When you upload a file, our tool generates the complete data URI including the MIME type (e.g., data:image/png;base64,iVBOR...). You can use these in HTML <img> tags, CSS background-image properties, or anywhere a URL is expected. This eliminates extra HTTP requests for small assets, improving page load performance.
A common misconception is that Base64 provides security. It does not — Base64 is a reversible encoding with no key, cipher, or mathematical transformation. Anyone can decode Base64 instantly. It is used alongside encryption (like HTTPS or AES) to safely represent encrypted binary data as text. Never rely on Base64 alone to protect sensitive information. If you need security, use proper encryption algorithms and protocols.
Encode username:password credentials for the Authorization header in HTTP Basic Auth. Format: Basic base64(user:password). Always use over HTTPS.
Convert small images, SVGs, or fonts to Base64 data URIs and embed them directly in HTML, CSS, or JavaScript to reduce HTTP requests.
Encode binary data or complex objects as Base64 strings for inclusion in JSON API requests where binary data is not allowed.
MIME email encoding uses Base64 to attach binary files like images and PDFs to email messages, which are text-based protocols.
Decode the payload portion of JSON Web Tokens (JWT) to inspect the claims and data without verifying the signature.
Convert small icons and background images to data URIs for inline CSS, eliminating separate image file requests for tiny assets.
Encode configuration values, API keys, or tokens for safe inclusion in environment variables or CI/CD pipeline configurations.
Quickly decode Base64 strings found in API responses, log files, or network traces to understand the underlying data.

Founder & Developer of FreeKit
I personally designed and built every tool on this website — including the one you just used. If these tools have been helpful, I can build custom tools, automation workflows, websites, and SEO solutions tailored to your business.
Remote: Available Now
United States & European company
USD $25/hour or USD $1,500/month
On-site: Open to Relocation
With work visa & travel support