Skip to content
AdeptBay

How to use the Base64 Encode / Decode

Last verified 2026-08-08 · about 5 minutes to read

The short version

  • 1.Paste your text or Base64. The tool detects which direction you want by default.
  • 2.Switch to URL-safe if the result goes in a URL. Standard Base64 contains + and /, which have to be escaped in a query string.
  • 3.Copy the result. Everything runs in your browser — safe for tokens and credentials.

Why this is worth getting right

The browser's btoa() throws a DOMException on any character above U+00FF, which means most Base64 tools built on it fail on emoji, Bangla, Arabic and CJK. This one encodes to UTF-8 bytes before encoding, and decodes bytes back through TextDecoder, so every script round-trips exactly.

Method 1 — use the Base64 Encode / Decode on this site

The fastest route. It runs entirely in your browser, so nothing is uploaded and there is no queue to wait in. No account is needed and there is no daily limit.

  1. Paste your text or Base64. The tool detects which direction you want by default.
  2. Switch to URL-safe if the result goes in a URL. Standard Base64 contains + and /, which have to be escaped in a query string.
  3. Copy the result. Everything runs in your browser — safe for tokens and credentials.

Open the Base64 Encode / Decode

Method 2 — do it without this site

Worth knowing, because a tool you cannot replace is a dependency rather than a convenience. Most tasks in the developer division have a command-line or built-in equivalent; it is usually more setup and less convenient, but it works offline and it is scriptable, which matters once you are doing something a hundred times instead of once.

What this tool will not do

Every tool has an edge. These are ours for base64 encode / decode, stated up front so you find out here rather than halfway through a deadline:

  • Text only. Encoding a file to a data URI is a separate tool.
  • Base64 output is about 33% larger than the input — that is inherent to the format, not a limitation here.
  • Auto-detection can guess wrong on short strings that are valid both ways. Set the direction explicitly if so.

Questions people ask

Why does Base64 break on emoji and non-English text?

Because the browser's built-in btoa() only accepts characters below U+0100 and throws on anything else. This tool encodes the text to UTF-8 bytes first, then Base64-encodes those bytes, which is the correct sequence and round-trips every script.

What is URL-safe Base64?

A variant defined in RFC 4648 §5 that replaces + with - and / with _, and usually omits the = padding. Standard Base64 breaks inside URLs because + means a space in a query string and / is a path separator. JWTs use the URL-safe variant.

Is Base64 encryption?

No, and this matters. Base64 is an encoding, not a cipher — anyone can reverse it in one step with no key. It exists to move binary data safely through text-only channels. Never use it to hide anything.

Why does my Base64 fail to decode?

Usually one of three things: a character outside the Base64 alphabet somewhere in the string, a length that is impossible for valid Base64, or the string was truncated in transit. This tool restores missing padding automatically, so that particular cause is already handled.

Is my data uploaded?

No. Encoding and decoding both run in this browser tab. People decode JWTs and API keys with these tools constantly, so a Base64 tool that uploaded its input would be an unusually bad idea.

Open the Base64 Encode / DecodeEncode and decode Base64 with full Unicode support and URL-safe output.