Base64 — Encode and Decode Online

Encode and decode Base64. File support.

Encode
Decode
URL-safe
No padding
Plain text
Base64
VGhlIHF1aWNrIGJyb3duIGZveApqdW1wcyBvdmVyCnRoZSBsYXp5IGRvZw==

Base64 is a way to represent arbitrary binary data using plain text characters. Every 3 bytes turn into 4 ASCII characters from the set A–Z, a–z, 0–9, "+", and "/", so an encoded string ends up roughly a third longer than the original data. This is not encryption — anyone can decode Base64 back to the original, so it offers no real protection.

Base64 is needed wherever a channel is designed for text but you need to send binary data through it: email attachments, images embedded directly in CSS or HTML (data: URIs), tokens and keys in JSON and headers, or data inside a URL. This tool encodes and decodes in both directions, handles plain text, and works with UTF-8 (non-Latin text encodes correctly).

Everything runs right in your browser — nothing you enter is ever sent anywhere. Paste your string, choose a direction (encode/decode), and copy the result. If decoding produces gibberish, the input probably isn't valid Base64 or the string is corrupted. For URLs and query parameters, use URL encoding instead.

Frequently asked questions

URL-safe Base64 replaces "+" and "/" with "-" and "_" so the string can be used in a URL without percent-encoding. The "=" padding character is sometimes stripped too.
Yes. Before encoding, the string is converted to UTF-8 bytes (via TextEncoder), which correctly handles any Unicode characters.
The "=" character at the end, added so the string length is a multiple of 4. Standard Base64 always includes padding; some protocols (like JWT) omit it.
No. Base64 is just a different representation of the same data — anyone can decode it back. For actual confidentiality, you need real encryption (AES, etc.).