Skip to main content

Base64 Text Encoder

Encode text to Base64 and decode it back — with proper UTF-8 handling (Chinese and emoji won't break) and an URL-safe mode. Everything stays in your browser.

Processed locally · 0 bytes uploaded

Input

Output

Specific Size & Task Presets

How to use Base64 Encoder

  1. Paste text into the input box.
  2. Choose Encode or Decode depending on the direction.
  3. Copy the result with one click.

Common use cases

  • Embed small assets as data URIs in CSS or HTML.
  • Decode a Base64 token while debugging an API.
  • Encode UTF-8 text — Chinese and emoji included — without corruption.
  • Prepare a basic-auth header for a quick test request.

Good to know

  • Base64 is encoding, not encryption — never use it for secrets.
  • URL-safe mode swaps reserved characters for use in links.
  • Very large inputs are better handled by a dedicated file tool.

Specs

Supported formats
Input & Output: UTF-8 plain text ↔ Standard & URL-safe Base64 strings
File & batch limits
Text payloads up to several MB encode/decode in milliseconds inside browser memory
AI model download
None (0 MB — native TextEncoder / TextDecoder)
Browsers & devices
All modern browsers on desktop, iPhone and Android
Offline support
Yes — works 100% offline immediately after loading

FAQ

Is my data uploaded?

No. Encoding is built into your browser — tokens, credentials and payloads stay on your device.

Why do other tools mangle Chinese text?

JavaScript's native btoa() only handles Latin-1. This tool routes through TextEncoder/TextDecoder, so any UTF-8 text — Chinese, emoji, Arabic — round-trips correctly.

When do I need URL-safe Base64?

When the encoded value goes into a URL or filename (JWTs, tokens in links) — standard Base64's + and / characters break URLs, so they're swapped for − and _.

Share this tool: