Base64 Encoder & Decoder
Encode text to Base64 or decode it back — any language, standard or URL-safe, with binary data flagged clearly. Free and entirely in your browser.
Text to Base64
Base64 to Text
🔒 Your code never leaves the browser — not one character is sent anywhere, and nothing is stored
How to use it
- To encode: paste your text into the "Text to Base64" boxIt converts instantly, in any language — English, Arabic, emoji.
- Choose the variant if you need itThe URL-safe box swaps the characters that can break inside a URL or filename.
- To decode: paste Base64 into the second boxBoth standard and URL-safe variants are accepted without you picking which one.
- Copy whichever result you needA separate copy button sits under each box, plus one clear button that empties all four at once.
Enjoying the tool? Help us keep it free forever — Support OMXHub ❤️
Frequently Asked Questions
Why do other tools break on non-Latin text and emoji, and this one doesn’t?
The browser’s built-in function (btoa) understands one character per byte (Latin-1), so any Arabic letter or emoji — wider than a single byte — makes it throw or silently return wrong output. We convert your text to UTF-8 bytes first (the encoding nearly every website uses), then encode the bytes — so the text comes back correct no matter what language it’s in.
What’s the difference between standard and URL-safe?
Exactly the same encoding with a few different characters: the standard variant uses + and / and ends with = padding, while URL-safe swaps those for - and _ and omits padding entirely. The reason: +, / and = have special meaning in URLs and filenames, so plain Base64 inside a link can break — URL-safe exists precisely to avoid that.
I decoded Base64 and got strange non-text data. What happened?
Nothing went wrong — Base64 encodes any binary data (images, files, encryption keys), not just text. If decoding your input produced bytes that aren’t valid UTF-8 text, we tell you plainly "binary data" and show the byte count plus the first 32 bytes as hex, instead of displaying broken symbols.
Why do you accept Base64 containing spaces or newlines?
Many systems (like email under MIME) wrap long Base64 strings at every 76 characters with a newline. We strip any whitespace before decoding so you never have to manually flatten the text onto one line.
Is Base64 a form of encryption?
No — a common mix-up worth correcting. Base64 is encoding only: a way to represent binary data as text, not to hide or protect it. Anyone can decode any Base64 instantly, without a password or key, including with this very tool. If you need real confidentiality, you need actual encryption (like our PDF protection tool), not Base64.
Is my text uploaded to a server?
No, not a single character. Encoding and decoding happen entirely inside your browser.