Free Tools Grid

Base64 Encoder / Decoder

Developer Tools

Encode plain text into Base64 or decode Base64 back to text. UTF-8 safe, with an optional URL-safe variant for use in tokens and URLs.

Runs entirely in your browser
Loading tool...

About Base64 Encoder / Decoder

Base64 is the standard encoding for representing arbitrary binary data as ASCII text. It's used everywhere — embedding images in CSS or HTML (`data:` URLs), encoding small binary payloads in JWTs, transmitting credentials in HTTP Basic auth, encoding email attachments (MIME), and storing binary content in JSON.

This tool encodes and decodes Base64 strings safely with full UTF-8 support, so emoji and non-ASCII text round-trip correctly. The URL-safe variant (RFC 4648 §5) replaces `+` with `-` and `/` with `_`, and strips trailing `=` padding — the format used by JWTs and many web APIs. Switching between standard and URL-safe modes is a one-click toggle. Everything runs in your browser via the native `btoa`/`atob` with a UTF-8 wrapper for multi-byte input.

How to use

  1. 1

    Pick a direction

    Choose the Encode or Decode tab.

  2. 2

    Toggle URL-safe if needed

    If you're working with JWTs, OAuth tokens, or any context that puts Base64 in a URL, enable URL-safe variant.

  3. 3

    Paste your input

    Plain text for encoding, or a Base64 string for decoding. Conversion runs as you type.

  4. 4

    Copy the result

    Use the Copy button to grab the output for use elsewhere.

Examples

Encoding a simple string

Standard Base64 of an ASCII string.

Input

Hello, Tekvion!

Output

SGVsbG8sIFRla3Zpb24h

URL-safe variant

Same content, but with `+` → `-`, `/` → `_`, and no padding.

Input

Hello, Tekvion! 🎉

Output

SGVsbG8sIFRla3Zpb24hIPCfjok

Decoding back to text

Decoding the standard Base64 returns the original string.

Input

SGVsbG8sIFRla3Zpb24h

Output

Hello, Tekvion!

Frequently asked questions

What's the difference between standard and URL-safe Base64?+

Standard Base64 uses `+`, `/`, and trailing `=` padding. URL-safe Base64 replaces these with `-`, `_`, and drops the padding, so the string can safely appear in URLs and filenames.

Does it handle non-ASCII text?+

Yes — the tool wraps the native `btoa`/`atob` with UTF-8 encoding/decoding, so emoji, CJK characters, and other multi-byte sequences round-trip correctly.

Can I encode files?+

Not in this tool; it's text-only. For file encoding (e.g. embedding an image as a `data:` URL), pair it with our Image tools or use a dedicated file-to-data-URL converter.

Why is the decoded output garbled?+

If the input was not valid Base64 (or was URL-safe but you forgot to toggle the option), the tool tries to decode but the result will be nonsense. Check the variant and the input.

Is my text sent anywhere?+

No. Encoding and decoding happen in your browser using built-in APIs.