Type a tool name, for example "keyword density" or "transcript".
Encode and decode text to/from Base64. Supports UTF-8 and URL-safe variants.
Use this Base64 encode decode tool to turn plain text into Base64 or convert a Base64 string back into readable text. It supports UTF-8 characters, URL-safe output and optional padding removal, and it shows the result instantly. Developers, testers and SEO specialists can use it to inspect or prepare encoded data in seconds.
Base64 is a way to represent data using only 64 safe text characters: A to Z, a to z, 0 to 9, plus the symbols + and /. Encoding converts the original bytes into that text form. Decoding reverses the process and returns the original bytes.
The conversion works in groups. Every 3 bytes of input become 4 Base64 characters, so encoded data is about one third larger than the original. When the input length is not a multiple of 3, the output ends with one or two = signs. These are called padding characters.
Base64 is an encoding, not encryption. Anyone can decode it, and it adds no secrecy. Its job is to let data travel through systems that only handle plain text, such as email bodies, JSON fields, HTML attributes and HTTP headers.
Standard Base64 uses + and /, which have special meanings in web addresses. The URL-safe variant swaps them for - and _ so the string can sit in a query parameter or a file name without extra escaping. Many tokens you see in web apps use this variant, often without the trailing = padding.
You can encode or decode text in a few clicks. The tool starts in Encode mode, and the same box and buttons handle both directions.
= characters removed from the encoded result.The two checkboxes only change encoded output. When you decode, the tool accepts standard and URL-safe strings alike, ignores spaces and line breaks, and adds any missing padding for you.
A quick example shows exactly what to expect. Enter Hello, World! in Encode mode and click Encode. The output is SGVsbG8sIFdvcmxkIQ==, and the status line reads "Encoded 13 characters." The two = signs appear because 13 bytes do not divide evenly by 3.
Now tick No padding and encode again. You get SGVsbG8sIFdvcmxkIQ, the same string without the trailing signs. Paste that shorter version into Decode mode and you still get Hello, World! back, because the tool restores the padding before decoding.
Encode the six characters >>>??? with default settings and you get Pj4+Pz8/. Tick URL-safe and the result becomes Pj4-Pz8_. Both strings decode to the same text. The only difference is that the second one can be placed in a link without percent-encoding.
The word café contains an accented letter that takes two bytes in UTF-8. The tool encodes it as Y2Fmw6k=, and decoding that string returns café intact. This is why emoji, accented letters and non-Latin scripts survive a round trip.
The output box and the status line tell you whether the conversion worked. A green message such as "Decoded successfully." means the text is ready to copy. A red message starting with "Error:" means the input could not be converted, and the output box is left empty.
| What you see | What it means | What to do |
|---|---|---|
| Output ends in = or == | Standard padding was added | Keep it for most APIs and email |
| Output has - and _ | URL-safe variant | Use it in URLs and tokens |
| Error message | Input is not valid Base64 or not valid text | Check for stray characters |
To confirm your data is intact, encode it, click Use output as input, switch to Decode and click Decode. If the final text matches your original, the encoding is correct. This takes about ten seconds and catches copy and paste mistakes before they reach production.
Because 3 bytes become 4 characters, a 300-byte string becomes about 400 characters. Keep this in mind when embedding data in a header, cookie or configuration field that has a length limit.
Anyone who moves data between systems eventually meets Base64, and a quick converter saves a trip to the command line. Here are the situations where it helps most.
user:pass gives dXNlcjpwYXNz, which you can compare with what your code sends.If you work on server rules or headers, these related utilities often come up in the same session: the htaccess redirect generator and the CORS header generator. You can find more in the web developer tools collection.
Most Base64 problems come from the input, not the conversion. These are the cases people hit most often, with the fix for each.
An error means the input contains characters that Base64 does not allow, or the decoded bytes are not valid UTF-8 text. Look for stray quotes, commas, brackets or a leading label such as Basic in front of the value. Remove them and try again.
Image strings often look like data:image/png;base64,iVBOR.... Only the part after the comma is Base64. Delete the prefix before decoding, or the colon and comma will trigger an error.
If the string is an image, PDF or other binary file, the bytes are not readable text, so Decode mode will report an error instead of showing content. This tool is built for text in and text out.
Email and some command-line output wrap Base64 at fixed line lengths. You can paste the wrapped version as is, because spaces and line breaks are ignored when decoding.
If the original was written in a legacy character set rather than UTF-8, the decode may fail or show unexpected symbols. Ask the sender which character set they used, or re-encode the source as UTF-8 and try again.
This tool converts text to Base64 and back. It does not upload or convert files, and it does not decrypt anything. Decoding returns readable text only when the original data was valid UTF-8 text.
The status line shows a character count when you encode, which counts characters, not bytes. A string with accented letters or emoji will produce more Base64 than its character count suggests, because those characters use two to four bytes each.
Ready to convert something? Choose Encode or Decode above, paste your text, set the URL-safe and No padding options if you need them, and copy the result. If you are chasing a bug, run a round-trip check first, then compare the output with your code.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato Market