Home › Developer Tools

Base64 Encode & Decode

Base64 is not encryption. Anyone can decode it, so don't use it to hide passwords.

Files are processed in your browser and never uploaded

Between Base64, text and files

Base64 turns binary data such as images or files into a string made of just 64 characters (A–Z, a–z, 0–9, +, /) plus =. It's used wherever only text can travel: email attachments, images embedded in JSON or HTML (data URIs), API auth headers, JWT tokens. This tool converts in all three directions right in your browser.

Text ↔ Base64

Text is encoded as UTF-8 bytes first, so results match other tools and languages (Python, Java, the Linux base64 command). “URL-safe” replaces + and / with - and _ and drops trailing =, so the result can go in URLs and file names (JWT style). Decoding handles URL-safe Base64 and line breaks automatically; if the decoded data isn't text, you'll be told to save it as a file.

File → Base64, Base64 → file

Drop an image, PDF or font to get Base64 or a data URI like data:image/png;base64,… — handy for embedding small icons in CSS or HTML. Base64 is about 33% larger than the original, so it's not ideal for big files. Paste a Base64 string or data URI to save it as a file: the type (PNG, JPG, GIF, PDF, ZIP…) is detected from the header bytes and images are previewed.

Base64 is an encoding, not encryption — anyone can decode it. Never rely on it to hide passwords or personal data. All conversions happen on this device.

Frequently asked questions

What's the = at the end?

Padding to make the length a multiple of 4. URL-safe Base64 drops it and still decodes.

Can I decode a JWT?

Paste the middle part (between the dots) to see its JSON payload. The signature isn't verified.

Decoded text looks garbled.

The Base64 may have been made from a non-UTF-8 encoding. This tool decodes as UTF-8.

Related tools