PocketPlay
中文

Base64 Encode / Decode

Encode and decode Base64 text, URL-safe Base64 and data URIs, and convert any file to Base64 and back.

🔒 Runs in your browser — files never leave your deviceFree · No sign-up

Encoding text as Base64

Input

Output

0 BInput
0 BOutput
Size change

How to use the Base64 converter

  1. On the Text tab, paste text to encode it — or paste Base64 and the tool decodes it automatically.
  2. Tick URL-safe for tokens that travel in a URL, or Wrap at 76 characters for MIME-style output.
  3. On the File tab, drop any file to get its Base64 (or a ready-made data: URI), and paste Base64 back to download the original file.

FAQ

Does it handle emoji and Chinese text?

Yes. Text is converted to UTF-8 bytes before encoding, so 中文, emoji and accented letters survive a round trip — unlike btoa() on its own, which throws on anything above U+00FF.

What is URL-safe Base64?

The RFC 4648 “base64url” alphabet swaps + and / for - and _ and usually drops the = padding, so the value can be used in a URL path, a query string or a JWT without being escaped. Decoding accepts either alphabet.

Is Base64 encryption?

No — it is just a way to carry binary data through text-only channels, and anyone can decode it. Never use it to hide passwords or tokens.