All guides

How to encode and decode Base64

A quick guide to Base64 encoding and decoding text safely in your browser with Toolora.

What Base64 is for

Base64 turns text or binary data into ASCII characters that travel safely through systems that expect plain text. It is useful for data URLs, debugging tokens, and transfer formats.

Encode text

Open Base64 Encode, paste your text, and copy the encoded output as it updates. There is no Run button on the article page. Toolora uses UTF-8 so international characters encode correctly.

Decode text

Open Base64 Decode, paste a Base64 string, and copy the decoded text as it updates. If decoding fails, check for missing padding, truncated input, or characters that are not part of Base64.

Important security note

Base64 is not encryption. Encoded values can be decoded by anyone. Never treat Base64 as a way to protect passwords or secrets. Hash Generator and HMAC use cryptography; bcrypt is for password hashes. Image ↔ Base64 at /tools/image-base64 is for pictures and data URIs, not for arbitrary strings — use /tools/base64-encode and /tools/base64-decode for text.

Worked example

Encode the UTF-8 word “café”. The output is longer than four letters and decodes back to café with the accent intact. A truncated string missing = padding often fails decode. Whitespace inside a Base64 blob is sometimes tolerated by browsers and sometimes not — paste the compact alphabet. JWT segments are Base64URL (different alphabet, no padding); use JWT Decoder, not this pair, for tokens.

Privacy

Encode and decode stay in this tab. Close the page after pasting session tokens you only needed to inspect. Related: /tools/hex-encode-decode for byte hex, /tools/url-encode for query strings.