Skip to content
ToolFarmToolFarm
Developer

Base64 Encoder/Decoder

Encode and decode Base64 text, with optional URL-safe alphabet.

2 min read

What this tool does

Encode and decode Base64 text directly in your browser. Supports the standard alphabet and the URL-safe alphabet, with no characters that conflict inside URLs.

To decode a JWT payload, first send it to JSON formatter. If you work with unique IDs, UUID generator is a natural companion.

What you can use it for

  • Encode credentials for an Authorization Basic header.
  • Decode a JWT payload to inspect its contents.
  • Convert text to Base64 to embed it inside a data URI.
  • Decode a Base64 parameter that arrives in a URL.

How to use it

  1. Paste the text or the Base64 string into the input area.
  2. Pick the mode: encode or decode.
  3. Enable the URL-safe alphabet if the output will live inside a URL.
  4. Copy the result with a single click.

Everything runs inside your browser. No file is uploaded to any server. See more tools in this field.

Examples you'll actually run into

These are the real-world Base64 uses you'll see in production. Each one is shown with its input and output so you understand what's actually being moved.

Authorization Basic header

Input

user:pass

Output

dXNlcjpwYXNz

Text with accents

Input

España 🇪🇸

Output

RXNwYcOxYSDwn4eq8J+Huw==

JSON in data URI

Input

{"id":42}

Output

eyJpZCI6NDJ9

URL-safe

Input

?foo=bar&x=1

Output

P2Zvbz1iYXImeD0x

Other tools people reach for in the same flow.

Developer

Frequently asked questions

What is Base64?

Base64 is a way to represent binary data using 64 printable ASCII characters. It's used to send images, keys or binary JSON over text-only channels such as HTTP headers or URLs.

What's the difference with the URL-safe alphabet?

The standard alphabet includes + and / as two of its characters. In a URL, those characters have special meanings and must be escaped. The URL-safe alphabet replaces them with - and _, so you can paste the output into a URL with no extra escaping.

Is it safe to encode passwords in Base64?

No. Base64 is encoding, not encryption. Anyone who intercepts the string can decode it without effort. For sensitive data you need real encryption (TLS for transport, AES for storage).

Is there a size limit?

For regular text, no. The tool runs in browser memory, so several megabytes work fine. Beyond that it may slow down.