Base64 / URL Encoder
Encode and decode Base64, Base64URL, percent-encoded URLs, and files (image/PDF preview included). UTF-8 safe, runs entirely in your browser.
About this Base64 / URL encoder
This tool encodes and decodes text and files between Base64, Base64URL, and percent-encoded URL formats. UTF-8 is handled natively, so emoji and CJK characters round-trip exactly. Everything runs locally in your browser — files never leave your device.
Supported modes
Standard Base64 follows RFC 4648 §4 (with `+/` alphabet and `=` padding). Base64URL follows RFC 4648 §5 (`-_` alphabet, padding stripped). URL mode toggles between `encodeURIComponent` (encodes everything reserved) and `encodeURI` (preserves `/?#` etc.).
File encoding
Drop, paste, or choose any file under 10 MB to get its Base64 payload and a ready-to-use `data:` URL. Decoding sniffs PNG / JPEG / GIF / WebP / PDF / SVG / ZIP / GZIP magic bytes so the rebuilt file gets the right MIME type and extension.
FAQ
- Is Base64 encryption?
- No. Base64 is an encoding (a reversible mapping); anyone with the encoded value can decode it. Use it for transport, not for secrecy.
- Why does the encoded value look bigger than the original?
- Base64 represents every 3 input bytes with 4 output characters, so output is ~133% the size of the input plus padding.
- When should I use Base64URL?
- Whenever the encoded value will appear in a URL, JWT segment, or filename — Base64URL avoids `+`, `/`, and `=` that would otherwise need percent-escaping.
- Are my files uploaded?
- No. Reading, encoding, and decoding all happen in the browser via FileReader and Blob APIs.

