Base64 Encoder
Encode UTF-8 text or local files as Base64, Base64URL, or a data URL.
File → Base64
Choose or drop a file up to 4 MiB.
Base64 → File
Your input is processed locally in this browser tab.
How to use Base64 Encoder
Choose the Text tab to encode UTF-8 text or the File tab to drop or select any local file up to 4 MiB.
Toggle URL-safe (base64url) when generating tokens or query-safe strings, or choose Data URL for inline HTML/CSS.
Copy the Base64 result or use Swap/output-to-input to round-trip immediately.
Frequently asked questions
What is the difference between Base64 and Base64URL?
Base64URL replaces + and / with - and _ and omits trailing = padding so values pass safely in URLs and JWT segments.
Are local files uploaded when generating data URLs?
No. File bytes are read via FileReader/ArrayBuffer directly in browser memory.