Skip to content
BeeToolsFast. Private. Free.

Base64 Encoder & Decoder

Runs in your browser

Encode text to Base64 or decode it back, with full Unicode support and a URL-safe option.

Developer Tools

Uses - and _ instead of + and /, and drops the = padding. Required for JWTs and query strings.

Swap and reuse the current output as input.

Plain text

Base64

Nothing to show yet

Enter text on the left and the Base64 appears here instantly.

Your data never leaves your device

This tool runs entirely in your browser. Nothing you enter is uploaded, stored or logged by BeeTools.

How to use the base64 encoder & decoder

  1. Pick a direction

    Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.

  2. Enter your input

    Type or paste into the left panel. When decoding, line breaks and whitespace are ignored, so wrapped Base64 from an email header or PEM file works as-is.

  3. Turn on URL-safe if you need it

    Use Base64url when the result will go into a URL, a filename or a JWT. Standard Base64 is correct everywhere else.

  4. Copy or download the result

    The output updates as you type. Copy it to your clipboard or save it as a text file.

Features

  • Correct Unicode handling

    Text is encoded as UTF-8 first, so emoji and non-Latin scripts round-trip exactly.

  • URL-safe Base64url

    Switch to the "-" and "_" alphabet with padding removed, as used by JWTs.

  • One-click round-trip

    Swap direction and reuse the output as the new input to verify an encoding.

  • Strict decoding

    Tells you when a string is not valid Base64, or decodes to binary rather than text.

  • Size comparison

    See input size, output length and the encoding overhead, which is about 33%.

  • Runs locally

    Encoding happens in your browser, so credentials and tokens are never transmitted.

About this tool

Base64 turns arbitrary bytes into a string of 64 safe ASCII characters, which is how binary data travels through channels that only reliably carry text — email headers, JSON fields, data URLs, HTTP basic auth and JWTs.

This encoder handles Unicode correctly, which is the thing most quick Base64 snippets get wrong. Text is converted to UTF-8 bytes first and then encoded, so emoji, accented Latin characters, Arabic, Chinese and mathematical symbols all round-trip exactly. Decoding is strict: if a string decodes to bytes that are not valid UTF-8 text, you are told that rather than being handed a string full of replacement characters.

There is also a URL-safe mode. Standard Base64 uses "+" and "/", both of which have special meaning in URLs, and "=" padding, which is awkward in a query string. Base64url substitutes "-" and "_" and drops the padding — the variant used by JSON Web Tokens.

  • Correct Unicode handling. Text is encoded as UTF-8 first, so emoji and non-Latin scripts round-trip exactly.
  • URL-safe Base64url. Switch to the "-" and "_" alphabet with padding removed, as used by JWTs.
  • One-click round-trip. Swap direction and reuse the output as the new input to verify an encoding.
  • Strict decoding. Tells you when a string is not valid Base64, or decodes to binary rather than text.
  • Size comparison. See input size, output length and the encoding overhead, which is about 33%.
  • Runs locally. Encoding happens in your browser, so credentials and tokens are never transmitted.

Frequently asked questions

Is Base64 encryption?

No, and this is an important distinction. Base64 is an encoding, not a cipher — it is completely reversible by anyone, with no key involved. Never use it to protect a password, an API key or personal data. Its purpose is to make binary data survive transport through text-only channels.

Why does Base64 make my data larger?

Base64 represents every three bytes as four ASCII characters, so the encoded form is about 33% larger than the original, plus up to two padding characters. That is the unavoidable cost of restricting yourself to 64 safe characters.

What is the difference between Base64 and Base64url?

They encode identical data with two characters swapped. Standard Base64 uses "+" and "/" as its last two characters, both of which need escaping in a URL. Base64url uses "-" and "_" instead and usually omits the trailing "=" padding, which makes it safe to drop into a query string, a filename or a JWT without further escaping.

Why did my decode fail?

Usually the string was truncated when copied, or a character was lost. Valid Base64 has a length that is a multiple of four once padding is included, and uses only letters, digits and the two symbols for its variant. If the string is genuinely valid but represents an image or a zip file, decoding it to text is not meaningful — the tool will say so rather than showing garbled output.

Can I encode a file, not just text?

This tool works with text. File-to-Base64 conversion — for example to build a data URL for an image — is a separate job, and one that is often better handled by the image tools here, which produce a usable image directly.

Is my input sent to a server?

No. Encoding and decoding both use browser built-ins and run entirely on your device. That matters for this tool in particular, since Base64 strings frequently contain credentials — HTTP basic auth headers and JWTs among them.

Tools that pair well with this one.