DevTools.

Base64 Encoder / Decoder

Convert text to Base64 and back. Handles Unicode, URL-safe Base64 and missing padding, and explains exactly what is wrong when the input is not valid Base64.

0 characters

How to use

  1. Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
  2. Type or paste into the left panel. The result appears on the right as you type.
  3. When encoding, tick URL-safe to use - and _ instead of + and /, and untick Padding to drop the trailing = characters.
  4. Use Swap to move the result into the input and switch direction, then copy or download the output.

Example

Input

Hello, World!

Output

SGVsbG8sIFdvcmxkIQ==

Common use cases

  • Inspecting the payload of a Base64-encoded API field, header or configuration value.
  • Encoding credentials or small values for HTTP Basic authentication headers.
  • Creating URL-safe tokens and identifiers without characters that need escaping.
  • Reading the parts of a JWT, which uses URL-safe Base64 without padding.

Common mistakes

  • Treating Base64 as encryption. It is an encoding anyone can reverse and provides no secrecy.
  • Mixing the standard and URL-safe alphabets. The decoder accepts both, but other systems may not.
  • Expecting binary data to appear as text. Decoding an image or archive does not produce readable text.
  • Including characters that are not part of Base64, such as quotes or a data: URL prefix.

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 only changes how data is represented, using 64 printable characters. Anyone can decode it, so never use it to protect secrets.

What is URL-safe Base64?

It replaces + with - and / with _ so the result can be used in URLs and filenames without escaping, and it often omits the = padding. The decoder here accepts both forms automatically.

Why does Base64 make data larger?

Every 3 bytes of input become 4 characters of output, so the encoded form is roughly one third larger than the original.

Does it support Unicode and emoji?

Yes. Text is encoded as UTF-8 before it is converted to Base64, and decoded results are interpreted as UTF-8. If the decoded bytes are not valid UTF-8, you get an error instead of garbled text.

Is my data uploaded anywhere?

No. Encoding and decoding run entirely in your browser and your input is never sent, logged or stored.