Base64 Encode and Decode
Encode and decode Base64 in your browser - text, files and images, URL-safe and ...Encode and decode Base64 in your browser - text, files and images, URL-safe and data-URI, UTF-8 safe. Nothing is uploaded.
Updated
0 chars
0 chars
File or image to Base64
Quick answer
A base64 encoder converts text, files, or images into an ASCII string that is safe to embed in URLs, JSON, or HTML, and a decoder reverses it. YaliKit's version runs entirely in your browser with the FileReader and TextEncoder APIs, so nothing is uploaded and there is no size limit, and it supports URL-safe output, data URIs, and UTF-8 emoji.
Why It's Better
Why Use Base64 Encode and Decode?
Your Files Never Leave Your Browser
Text and files are encoded locally with the browser's own APIs, so nothing is uploaded to a server. The big Base64 sites upload your files - this one physically cannot see them, and there's no size limit.
Base64 to Image, and Back
Paste a Base64 string or a data URI and if it's an image, you get an instant preview and a download button. Drop an image in to get its Base64. Most text-focused Base64 tools skip this entirely.
URL-Safe and data: URI
One toggle switches to URL-safe Base64 (- and _ instead of + and /, no padding) for JWTs and URLs, and another wraps the output as a ready-to-paste data: URI.
UTF-8 Safe (Emoji and Any Language)
It encodes through UTF-8, so emoji and non-English text round-trip correctly. Naive Base64 tools built on raw btoa() throw an error or corrupt these.
Common Uses
Embed Images in Code
Turn a small image into a data URI for HTML or CSS.
JWTs and URLs
Encode and decode URL-safe Base64 for tokens.
Debug APIs
Decode Base64 fields in JSON payloads and logs.
Extract Images
Turn a Base64 blob back into a downloadable image.
How It Works
Choose Encode or Decode
Encode turns text into Base64; Decode turns Base64 back into text. Use Swap to flip the two panes.
Type, Paste, or Drop a File
Type or paste into the input and the result updates live. Or drop a file in the 'File to Base64' area to get its Base64 without uploading it.
Copy or Download
Copy the result, or if it decodes to an image, download the image. Toggle URL-safe or data: URI as needed.
Pro Tips
Base64 Grows Your Data ~33%
Base64 makes data about a third larger, so use it for embedding and transport, not storage. For tiny images a data URI saves a request; for big ones, link the file instead.
Not a Security Tool
Base64 is trivially reversible. Never use it to hide passwords or secrets - it's encoding, not encryption.
URL-Safe for Tokens
If your Base64 is going into a URL, a filename, or a JWT, turn on URL-safe so + / and = don't break anything.