How to encode and decode Base64 (and Base64URL)
Debugging a token, preparing a payload, or escaping a value for a query string — Base64 shows up everywhere, and so do its URL-safe and percent-encoded cousins. Paste the text, pick the alphabet, and get the result you can paste right back.
Step by step
Open the Base64 and URL encoder
Start the free tool — conversion happens entirely on your device.
Paste your text
Enter the plain UTF-8 text to encode, or the encoded value to decode — café becomes Y2Fmw6k= and back again exactly.
Choose the alphabet
Pick standard Base64, unpadded Base64URL (- and _ instead of + and /), or URL-component percent-encoding.
Convert
Decoding is strict about UTF-8, so a malformed or binary-only value is rejected instead of producing mojibake.
Move the result back for a round trip
Send a completed result back into the input with one action to verify that encode-then-decode returns your original text.
Tips that save a second try
Base64URL is the right alphabet inside URLs and filenames: it swaps + and / for - and _, and this tool omits the trailing = padding when encoding (and restores it when decoding).
URL mode encodes one component with encodeURIComponent() — it does not build or validate a complete URL.
Encoding is not encryption: anyone who recognizes Base64 can reverse it, so never use it to protect a password or secret.
Common questions
What is different about Base64URL output?
It uses - and _ instead of + and /, and this tool omits trailing = padding. Those changes make the alphabet safe inside URL and filename contexts.
Can I use Base64 to protect a password or secret?
No. Base64 is a reversible representation, not encryption or hashing. Use an appropriate security mechanism for secrets.