Free Base64 Encoder / Decoder Online
Convert plain text to Base64 or decode a Base64 string back to readable text, instantly and entirely in your browser.
Image to Base64
Convert a JPG, PNG, WebP, or GIF into a Base64 data URI you can paste straight into CSS, HTML, or JSON — processed locally, nothing is uploaded.
How to encode or decode Base64
-
1
Paste your text
Enter plain text in the left box to encode it, or a Base64 string in the right box to decode it.
-
2
Click "Encode →" or "← Decode"
The conversion happens instantly using your browser's built-in Base64 functions.
-
3
Copy the result
Select the output box and copy the converted value into your code, config, or message.
Example use cases
Embedding images in CSS or HTML
Encode a small image as Base64 to inline it directly in a stylesheet or HTML file.
Passing data in a URL or JSON
Encode binary or special-character data so it survives being embedded in a URL or JSON payload.
Decoding an API token or payload
Decode a Base64-encoded value from an API response or JWT segment to inspect its contents.
Frequently asked questions
What is Base64 encoding used for?
Base64 turns binary or text data into a safe set of ASCII characters, commonly used for embedding images in HTML/CSS, sending data in JSON or URLs, and storing data in text-only formats like XML.
Is my data uploaded anywhere?
No. Encoding and decoding both happen locally in your browser using JavaScript — nothing you type is sent to a server.
Why does decoding sometimes fail?
Decoding fails if the input isn't valid Base64 — for example if it contains characters outside the Base64 alphabet or has incorrect padding. You'll see an "Invalid Base64 input" message in that case.
Does this support Unicode text?
Yes. Text is UTF-8 encoded before conversion to Base64, so accented characters, emoji, and non-Latin scripts round-trip correctly.
Can I convert an image to Base64 too?
Yes — use the Image to Base64 section further down the page. Upload a JPG, PNG, WebP, or GIF and it generates a ready-to-use data URI, entirely in your browser.