Free Base64 Encoder & Decoder

Encode and decode Base64 strings locally using UTF-8 TextEncoder/TextDecoder so Unicode and Emoji round-trip accurately, with URL-safe (- / _) support.

100% Browser-Local · Zero Upload Free · No Membership
Input0 chars
Result

How to Use

1

1. Paste Text or Base64

Enter plain text or encoded Base64 strings up to 2 MB.

2

2. Encode or Decode

Enable URL-Safe (- / _) mode for URL query parameters or JWT segments.

3

3. Copy or Swap

Copy the result in one click or swap panes to verify round-trips.

Common Use Cases

  • Encoding UTF-8 strings containing international characters or Emoji without garbled output.
  • Inspecting URL-safe Base64 payloads and test configuration tokens.
  • Validating whether a Base64 string decodes into valid UTF-8 text.

Practical Example & Limits

Example: Encoding "SeersGarden Tools · 你好" produces valid UTF-8 Base64, and swapping + decoding restores the exact original string.

Limits: Supports up to 2 MB text locally; invalid characters or malformed UTF-8 byte sequences trigger a clear error.

Frequently Asked Questions

Why does basic JavaScript btoa fail on Unicode?

btoa only accepts single-byte Latin-1 characters; we convert strings to UTF-8 bytes first.

Does decoding work without trailing = padding?

Yes, missing padding is normalized automatically on decode.

Recommended Next Tools

All 13 Tools →