Base64 Encode & Decode
Free Base64 encoder and decoder. Convert UTF-8 text, images and files to Base64 or data URIs and back, with URL-safe mode. Private — runs in your browser.
- No upload — 100% private
- Instant, on your device
- Free, no sign-up
- Works offline once loaded
How it works
How to use Base64 Encode & Decode
Pick Text or File / Image mode.
In Text mode, choose Encode or Decode and type or paste — the result updates instantly.
In File mode, drop a file to get its Base64 or data URI, or paste Base64 to rebuild and download the original file.
Copy the result or download it.
Why use it
Why use our Base64 Encode & Decode tool
UTF-8 safe
Accents, emoji and non-Latin scripts encode correctly — unlike plain btoa(), which breaks on them.
URL-safe Base64
Optional Base64URL output using - and _ without padding, as used in JWTs and URLs.
Files and images
Turn any file into Base64 or a ready-to-paste data URI for CSS, HTML or JSON.
Base64 to file
Decode Base64 back to a file; the type is detected from magic bytes with an image preview.
Forgiving decoder
Accepts standard or URL-safe input, missing padding, line breaks and full data: URIs.
FAQ
Frequently asked questions
What is Base64 used for?
Base64 represents binary data using 64 printable characters so it can travel through text-only channels such as JSON, email, HTML attributes, CSS and URLs.
Is Base64 encryption?
No. Base64 is an encoding, not encryption. Anyone can decode it instantly, so never use it to hide passwords or secrets.
What is URL-safe Base64?
Base64URL replaces + with - and / with _ and usually drops the = padding, so the output can be placed in URLs and filenames without escaping. JWTs use it.
Why does Base64 make files bigger?
Every 3 bytes become 4 characters, so Base64 output is about 33% larger than the original binary data.
How do I convert an image to a data URI?
Switch to File / Image mode, drop the image and choose Data URI. Copy the result into an <img src> or a CSS url() value.
Related tools
URL Encode & Decode
Percent-encode, decode and edit URL query parameters.
Hash Generator
MD5, SHA-1, SHA-256, SHA-512 and HMAC for text or files.
JWT Decoder
Decode JWT header and payload, check expiry, verify HMAC.
Compress Image
Shrink JPG, PNG and WebP files without visible quality loss.
JSON Formatter
Beautify, validate, minify and explore JSON as a tree.
UUID Generator
Generate v4 and v7 UUIDs in bulk, then validate and decode.
Regex Tester
Test JavaScript regular expressions with live highlighting.
Diff Checker
Compare two texts side by side with word-level highlights.