Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, with full UTF-8 support.
DeveloperResult
Base64
TWVyaGFiYSBEw7xueWE=
- Input length
- 13 characters
- Output length
- 20 characters
How does it work?
The Base64 Encoder/Decoder converts text to Base64 (encode) or turns a Base64 string back into readable text (decode). Text is first converted to a UTF-8 byte sequence, then every 3 bytes are mapped to a 4-character Base64 block, so accented characters and emoji encode and decode correctly. Checking the URL-safe option replaces the output's '+' and '/' characters with '-' and '_' and drops the trailing '=' padding — this avoids character clashes in URLs and tokens like JWTs. Decoding automatically recognizes both the standard and URL-safe alphabets, padded or not. Example: encode 'Merhaba Dünya' and the output is 'TWVyaGFiYSBEw7xueWE=' (13-character input, 20-character output); paste that output into Decode mode and running it gives you 'Merhaba Dünya' back. Use this tool to build a Basic Authentication header for an API request, embed a small image or file as a data URL in an email or in code, or manually decode a JWT's payload section to see what's inside it.
Example
TWVyaGFiYSBEw7xueWE=
Similar Tools
Toolbox Get your Toolbox ready.
Star the tools you use most and, with an account, they follow you to every device.
Frequently asked questions
Is Base64 encryption?
No. Base64 is just an encoding that anyone can reverse. Don't use it to protect sensitive data.
What is URL-safe Base64?
It uses '-' and '_' instead of '+' and '/' and drops the trailing '=' padding. JWTs and URLs use it.
Why is the Base64 output longer than the input?
Base64 encodes every 3 bytes as 4 characters, so the output is roughly 33% larger than the input — that's why the 13-character 'Merhaba Dünya' produces a 20-character Base64 string.
Can Decode handle any text?
No, only a valid Base64 string; if the decoded bytes aren't valid UTF-8 text (for example, a binary file), the tool reports that instead.
Can I decode standard and URL-safe Base64 the same way?
Yes, Decode mode automatically recognizes both alphabets ('+/' standard and '-_' URL-safe) and both padded and unpadded input.