Base64 encode and decode
Encode text to Base64, or decode Base64 back to text, as you type. Works with every language and with URL-safe Base64.
Your files stay on your device. Nothing is uploaded.
Step 1: Type or paste text
Step 2: Encode or decode
Step 3: Result
How to encode and decode Base64
-
Paste text or Base64
Paste the text to encode, or the Base64 to decode.
-
Choose encode or decode
Pick the direction. For encoding, choose URL-safe if the result goes into a web address or a token.
-
Copy the result
The result appears as you type. Copy it or download it.
About this tool
What Base64 is
Base64 writes any data with 64 safe characters (A-Z, a-z, 0-9, + and /), so it can travel through email, JSON, URLs and HTTP headers. It is an encoding, not encryption: anyone can decode it.
Every language
Text is turned into UTF-8 bytes before encoding, so Urdu, Arabic, accented letters and emoji encode and decode correctly, unlike tools that only handle English.
URL-safe Base64
URL-safe Base64 uses - and _ instead of + and / and drops the = padding. It is used in web tokens (JWT) and web addresses. Decoding accepts both kinds.
Privacy
This tool runs in your browser, on your own device. Your files and text are not uploaded to our server and we cannot see them. When you close or reload this tab, they are cleared, along with the results.
Frequently asked questions
Why does decoding say "binary data"?
That Base64 holds a file, such as an image, not text. To turn an image into Base64, use Image to Base64.
Is Base64 secure?
No. It hides nothing; never use it to protect passwords or secrets.
Is my text uploaded?
No. It runs in your browser, so nothing you type is sent anywhere.
Why is Base64 longer?
Every 3 bytes become 4 characters, so Base64 is about a third longer than the original.
Related tools
- %20 URL encode and decode Percent-encode text for URLs, or decode it back.
- Image › text Image to Base64 Turn an image into a Base64 data URI for code.
- { JSON } JSON formatter Format, validate, minify and sort JSON.
- Secure Password generator Make strong random passwords on your device.
- v4 · v7 UUID generator Make random UUIDs (version 4 or 7), up to 100 at once.
- Aa › AA Case converter Change text to upper, lower, title or sentence case.
- Replace Find and replace Replace words or patterns in text, with a count of changes.
- EAN · 128 Barcode generator Make Code 128, EAN-13, UPC-A, Code 39 and ITF-14 barcodes.