Features
- UTF-8 safeAccents and emoji survive the round trip.
- URL-safe modeFor tokens and filenames.
- Runs on your deviceYour data is processed in the browser and is never uploaded.
How to use the Base64 converter
- Choose Encode or Decode.
- Paste your text.
- Tick URL-safe if the result goes in a URL or filename.
- Copy the result.
Standard and URL-safe Base64
RFC 4648 defines both. The URL-safe form replaces + with - and / with _, and padding is often left off.
Base64 for UTF-8 text in JavaScript
const encoded = btoa(String.fromCharCode(...new TextEncoder().encode(text)));
const decoded = new TextDecoder().decode(Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0)));
Frequently asked questions
Is Base64 secure?
No. It hides nothing from anyone who decodes it.
Why is the output longer?
Every 3 bytes become 4 characters, about 33% larger.
Can I decode files or images?
This tool handles UTF-8 text only.