Base64 Encode / Decode
Encode text or small files to Base64 — or decode Base64 back to UTF-8. Standard and URL-safe.
Turn text or a small file into Base64. Use URL-safe for JWTs and query strings.
Sponsored
Ad space
How to use this tool
- Choose Encode or Decode, and Standard or URL-safe.
- Paste text (or drop a small file in Encode → File). Output updates live.
- Copy the result, or Swap to send output back to input and flip direction for a quick round-trip check.
UTF-8 Base64 without the classic btoa trap
Many quick snippets call btoa on a string directly and break on emoji or non‑Latin text. DevDock encodes UTF-8 bytes first, then Base64 — so “Hello 🚀” round-trips cleanly. URL-safe mode matches JWT and query-string conventions.
Working with tokens? Try the JWT Decoder. Need percent-encoding instead? Use the URL Encoder. Computing a checksum? Open the Hash Generator.
FAQ
Is Base64 encryption?
No. Base64 is an encoding so binary or text can travel safely in JSON, URLs, or email. Anyone can decode it — it does not hide secrets.
Standard vs URL-safe — which should I use?
Standard uses + and / and = padding (common in APIs and files). URL-safe swaps in - and _ and usually drops padding — use it for JWT segments, query strings, and filenames.
Why did decode say the bytes are not UTF-8?
The Base64 decoded to binary (for example an image or zip). This tool shows UTF-8 text. Encode files in Encode → File mode; for images you may also want the Image Compressor.
Is my text or file uploaded?
No. Encoding and decoding run entirely in your browser.
Can I paste a data: URI?
Yes. On decode, a prefix like data:image/png;base64, or data:text/plain;charset=utf-8;base64, is stripped automatically before decoding.
Sponsored
Ad space