Base64 Encoder & Decoder Online — Free
Type text or pick a file — encoding happens instantly in your browser.
A Base64 encoder and decoder that runs entirely in your browser. Encode text to Base64, decode Base64 back to text, or encode a file directly — useful for embedding images in HTML/CSS, debugging APIs, and working with data URIs. Nothing is uploaded, ever.
The file is read in your browser — never uploaded to any server.
How to use the Base64 tool
- Choose the tab: Encode (text → Base64) or Decode (Base64 → text).
- Paste your input — or pick a file to encode it straight from disk.
- Copy the result with one click.
When do developers use Base64?
- Data URIs: embed small images directly in CSS/HTML (
data:image/png;base64,…) to cut HTTP requests. - APIs: many JSON APIs accept file uploads as Base64 strings.
- Email: attachments travel as Base64 inside MIME messages.
- Basic auth: HTTP Basic credentials are Base64-encoded (not encrypted!) in the Authorization header.
Remember: Base64 is an encoding, not encryption. Treat decoded-looking secrets as public.
Frequently asked questions
What is Base64?
Base64 is a way to turn any data — text, images, or files — into a plain text string using only 64 safe characters (A–Z, a–z, 0–9, +, /, and = for padding). The result can be copied, pasted, and sent through text-only channels like JSON, URLs, or email.
Is Base64 encryption?
No. Base64 only changes the shape of data; it doesn't hide it. Anyone can decode a Base64 string in a second, so never use Base64 to protect passwords or secret data.
Why is Base64 output longer than the original text?
Base64 uses 4 characters to represent every 3 bytes of data, so the output is about 33% larger than the input. That's the price of making binary data travel through text channels.
Is it safe to paste secret text into this tool?
This tool runs 100% in your browser — your text is never sent to any server. Still, remember Base64 is not encryption, so don't encode passwords thinking it makes them safe.
Why does my decode fail?
The input must be valid Base64: only A–Z, a–z, 0–9, +, /, and = padding at the end. Extra spaces, line breaks in odd places, or URL-safe variants (- and _ instead of + and /) will fail. Clean the input and try again.