Base64 Encode / Decode
Enterprise safeConvert text or files to Base64 and back — Unicode-safe.
Frequently asked questions
Does this handle Unicode text correctly?
Yes — encoding goes through TextEncoder/TextDecoder rather than the older escape()/unescape() trick, so emoji, CJK characters, and any other multi-byte text round-trip correctly instead of turning into garbage.
What's the difference between standard and URL-safe Base64?
Standard Base64 uses + and / and pads with =, which need percent-encoding inside a URL. URL-safe Base64 swaps those for - and _ and drops the padding, so the result can go directly into a query string or path segment.
Can I encode a file, not just text?
Yes — the "File → data URI" mode converts any uploaded file (an image, for example) into a Base64 data URI you can paste into CSS or HTML. The file is read locally with FileReader and never uploaded anywhere.
Why do I get a decode error?
Base64 decoding is strict about its alphabet and padding — a truncated copy-paste, stray whitespace, or a string that was never valid Base64 in the first place will fail rather than silently returning garbage.
About this tool
Convert text or files to Base64 and back when a transport format needs printable characters, with separate handling for standard and URL-safe alphabets.
Workflow
- Choose the direction and mode that match the value you are working with.
- Enter text or select a local file for conversion.
- Check the output prefix, alphabet, and padding before copying it elsewhere.
- Decode a sample back to the original form when a round-trip check matters.
Things to know
- Base64 is an encoding, not encryption; anyone with the value can decode it.
- URL-safe output replaces plus and slash with URL-safe characters and may omit padding.
- Encoding increases the size of binary data, so it is not a compression format.
Base64 Encode / Decode on devsutils.com — Convert text or files to Base64 and back — Unicode-safe. It runs entirely in your browser: the input you paste is processed by client-side JavaScript and is never uploaded, logged, or stored. devsutils.com is a privacy-first suite of 70 developer utilities — JSON formatter, JWT decoder, Base64 encoder, regex tester, UUID generator, hash generator and more — with no accounts and no server-side processing.