Base64 Encoder
Encode any UTF-8 text to standard Base64 or URL-safe Base64 instantly. Donfig handles the full Unicode range correctly (many tools fail on non-ASCII characters). Toggle URL-safe mode to swap +/ for -_ and strip the trailing = padding — required for query strings, JWT segments, and other URL-embedded contexts. The character counter shows input vs output length so you can quickly compare overhead. Encoding runs entirely in your browser; nothing about your text is logged.
JavaScript is required to use the live tool. Please enable JavaScript and reload.
Frequently asked
What's the difference between Base64 and Base64URL?
Base64URL replaces + with - and / with _, and strips trailing = padding. It's safe to embed in URLs and filenames; standard Base64 is not.
Why does my encoded output look longer than the input?
Base64 represents 3 bytes as 4 ASCII characters, so the output is roughly 4/3 the input size.
Can I encode an image or binary file?
Currently the input is text. Drag-and-drop image-to-base64 is on the roadmap.