Dev Tools
Base64 / URL Encoder-Decoder
Encode or decode text as Base64 or URL-safe percent encoding, live as you type.
–
Runs entirely in your browser. Nothing you type is sent anywhere.
Learn about Base64 and URL encoding
Two different tools that look similar
Base64 turns arbitrary binary data into plain ASCII text using 64 printable characters, which is useful for embedding binary data somewhere that only handles text, like an email attachment, a data URI, or an auth header. URL encoding (percent encoding) does something unrelated: it escapes characters that aren't safe inside a URL, like spaces, &, and ?, by replacing them with a % followed by a hex code.
When to use which
Reach for Base64 when you need to represent binary data as text, or embed something inline. Reach for URL encoding when you need to put a value safely into a URL, query string, or form submission. The two get confused often because both turn readable text into a different-looking string, but they solve completely different problems.
Common questions
Why does Base64 output sometimes end with = signs? Those are padding characters, added when the input length isn't a clean multiple of 3 bytes, so the output lines up to a multiple of 4 characters. They're safe to leave in place, and some URL-safe variants drop or replace them.
Is Base64 a form of encryption? No. It isn't designed for secrecy at all, since anyone can decode it instantly with no key required. Never use Base64 as the actual protection for sensitive data.
Why does "URL-safe" Base64 give different output than regular Base64? URL-safe Base64 swaps two characters, + and /, for URL-friendly ones, - and _, since the standard characters have special meaning inside a URL.