Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 strings instantly. Supports UTF-8, Unicode, emojis and URL-safe Base64. Free, fast, works entirely in your browser — no data uploaded.

Did we solve your problem today?

What is Base64?

Base64 is an encoding scheme that represents binary or text data using 64 printable ASCII characters: uppercase letters A–Z, lowercase letters a–z, digits 0–9, +, and /. A padding character = is added to ensure the output length is a multiple of four.

Every three bytes of input produce four Base64 characters, which means Base64 output is always roughly 33% larger than the original.

Common Uses of Base64

Base64 is used wherever binary data needs to be stored or transmitted in a text-only format:

Base64 and Unicode

The browser’s native btoa() function only handles ASCII and Latin-1 characters and throws a DOMException for any character outside that range. This tool handles the full Unicode range by:

  1. Converting your text to UTF-8 bytes using TextEncoder
  2. Feeding those bytes into btoa() as a binary string
  3. On decode: running atob(), then interpreting the binary as UTF-8 with TextDecoder

This means emoji, Chinese, Arabic, Greek, and any other Unicode text can be safely encoded and decoded.

Standard vs. URL-safe Base64

Standard Base64 uses + and /, which have special meaning in URLs and query strings. URL-safe Base64 (also called Base64url, defined in RFC 4648 §5) replaces these characters and removes padding:

Standard Base64URL-safe Base64
+-
/_
= (padding)omitted

Use URL-safe Base64 when embedding Base64 in URLs, query parameters, filenames, or JWT tokens.

Base64 Encoding Examples

Original textBase64 output
HelloSGVsbG8=
Hello WorldSGVsbG8gV29ybGQ=
1234567890MTIzNDU2Nzg5MA==
caféY2Fmw6k=

How to Use This Tool

  1. Paste your text or Base64 string into the input box.
  2. Click Encode to convert plain text to Base64.
  3. Click Decode to convert a Base64 string back to plain text.
  4. Enable URL-safe Base64 to use - and _ instead of + and /.
  5. Click Copy to copy the result to your clipboard.

The tool encodes live as you type, so you see the result instantly.

Privacy and Security

All encoding and decoding happens entirely in your browser using built-in JavaScript APIs (btoa, atob, TextEncoder, TextDecoder). Your data is never sent to any server, stored, logged, or shared. You can use this tool offline once the page has loaded.

Important: Base64 is not encryption. Anyone who receives a Base64-encoded string can decode it instantly. Never use Base64 to protect sensitive data.

FAQ

What is Base64 encoding?

Base64 represents binary or text data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is widely used to embed images in HTML data URIs, encode data in HTTP Authorization headers, and pass binary content in JSON payloads. Base64 is not encryption — it is easily reversible.

Does this tool support Unicode and emojis?

Yes. The browser's native btoa() only handles Latin-1, so this tool first converts your text to UTF-8 bytes using TextEncoder before applying Base64 encoding. Decoding reverses this with TextDecoder. Emoji, Chinese, Arabic, and all other Unicode characters are fully supported.

What is URL-safe Base64?

Standard Base64 uses + and / characters that have special meaning in URLs. URL-safe Base64 replaces + with - and / with _ and removes trailing = padding. Use this variant when embedding Base64 in URLs, query parameters, or filenames.

Is my data sent to a server?

No. All encoding and decoding runs locally in your browser using built-in JavaScript functions (btoa, atob, TextEncoder, TextDecoder). Your data never leaves your device and is not stored anywhere.