Developer & Text Tools
Base64 Encoder/Decoder
Workspace
Options
Uses - and _ instead of + and /, without padding (RFC 4648 §5).
Prefix with data:<type>;base64, for HTML and CSS.
How to use this tool
- 1Choose Encode or Decode.
- 2Type or paste text, or open a file to encode its bytes.
- 3Pick URL-safe output, line wrapping or a data URI if you need them.
- 4Copy the result, or download the decoded file.
Frequently asked questions
This tool encodes text as UTF-8 first, which is what browsers, servers and most languages expect. Tools that use the old btoa() function fail or produce different output for characters such as é, ✓ or emoji.
It replaces + and / with - and _ and drops the = padding (RFC 4648 §5), so the result can go in URLs and file names without escaping. The decoder accepts both alphabets.
Yes. If the decoded bytes are not readable text, the tool detects common file types such as PNG, JPEG, PDF and ZIP and offers the original file as a download.
No. Base64 is an encoding that anyone can reverse. Do not use it to hide passwords or secrets.
No. Everything runs in your browser with JavaScript. The text you paste is not uploaded, logged or stored by MuhammadLab.