%url-decoder.net

Base64 Encode / Decode

Convert text to Base64 and back, with URL-safe output and bulk line processing. Free and fully in your browser.

0 chars · 0 bytes
0 chars · 0 bytes

Everything runs locally in your browser. Nothing you type or upload is ever sent to a server.

What is Base64?

Base64 (RFC 4648) is a way to write any sequence of bytes using only 64 printable ASCII characters: the letters A to Z and a to z, the digits 0 to 9, plus + and /. The encoder reads the input 6 bits at a time and maps each 6-bit group to one character, so every 3 bytes of input become exactly 4 characters of output. When the input does not divide evenly into 3-byte groups, the output is padded with =.

Its purpose is transport, not secrecy. Systems built for plain text, such as email, JSON, XML, and URLs, cannot carry raw binary safely; Base64 wraps the bytes in a form that survives the trip. You will meet it in data URIs, email attachments, HTTP basic authentication, API keys, certificates, and every JWT.

Standard Base64 vs URL-safe base64url

StandardURL-safe
Character 62 / 63+ and /- and _
Padding= requiredusually omitted
Safe in URLs and filenamesNoYes
Typical usesEmail (MIME), data URIs, certificatesJWTs, URL parameters, file names

Frequently asked questions

Is Base64 encryption?
No. Base64 is an encoding, not encryption: it changes how bytes are written, not who can read them. Anyone can decode Base64 instantly, so never use it to protect passwords or secrets. If you need confidentiality, use real encryption such as AES or TLS.
Why does my Base64 string end with = or ==?
Base64 turns every 3 bytes into 4 characters. When the input length is not a multiple of 3, the output is padded with one or two = signs so its length stays a multiple of 4. The padding carries no data and the URL-safe variant usually drops it.
Why does my decoded output look garbled or fail?
The Base64 you pasted probably encodes binary data such as an image, a hash, or compressed bytes rather than text. This tool decodes to UTF-8 text and reports binary content instead of printing garbage. Truncated strings and stray characters also cause failures.
What is base64url and when should I use it?
base64url is the URL-safe variant defined in RFC 4648: it replaces + with - and / with _ and usually omits the = padding, so the result can travel inside URLs, cookies, and filenames without extra escaping. JWTs use it for all three of their parts. This tool decodes both variants automatically.
Does Base64 make data bigger?
Yes, by about 33%: every 3 bytes become 4 characters, plus up to 2 padding characters. That overhead is the price of representing arbitrary bytes using only safe, printable ASCII.
Is it safe to paste sensitive data into this tool?
Encoding and decoding run entirely in your browser with JavaScript; nothing you type or upload is sent to a server. You can load the page, go offline, and it still works.