Skip to content
BrowserUtil

Base64 Encode / Decode

Encode and decode Base64 text, including UTF-8 safe mode.

Base64 to decode

Enter text to convert.
0 Input characters · 0 B

Decoded text

0 Output characters · 0 B

Recent conversions (this browser only)

The last 5 conversions are kept in your browser storage. Nothing is uploaded.

Nothing saved yet — conversions will appear here.

How to use

  1. 1 Choose Encode to turn text into Base64, or Decode to extract the original plain text.
  2. 2 Select formatting options such as UTF-8 safe mode, URL-safe characters (- and _), or MIME line breaks.
  3. 3 Copy the result with one click, or download it as a text file directly in your browser.

Features

  • Two-way real-time Base64 encode and decode
  • Full UTF-8 safe support for Unicode, emojis, Chinese, Japanese, and Korean
  • URL-safe Base64 mode (RFC 4648 §5) and configurable padding (=)
  • Line-wrapping presets for MIME (64 chars) and PEM (76 chars)
  • Automatic Data URL prefix recognition and payload decoding
  • Conversion statistics including byte sizes and payload expansion ratio
  • 100% client-side execution — your data never leaves your device

Frequently asked questions

What is Base64 encoding and why is it used?

'Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format using 64 printable characters (A-Z, a-z, 0-9, +, /). It is commonly used to transmit data over text-only protocols like email (MIME), or safely pass text and binary payloads in JSON, URLs, and cookies without encoding issues.

What is the difference between standard and URL-safe Base64?

'Standard Base64 uses "+" and "/", which have special meanings in URL query parameters and filenames. URL-safe Base64 (RFC 4648) replaces "+" with "-" and "/" with "_", and often omits trailing "=" padding, making it safe to use directly inside URLs and web tokens without extra percent-encoding.

Why do non-English characters or emojis sometimes break in Base64?

'JavaScript native window.btoa only accepts Latin-1 characters (0-255). Passing multi-byte Unicode characters like Chinese, Japanese, Korean, or emojis throws an error in basic tools. BrowserUtil enables UTF-8 safe mode by default, converting text into standard UTF-8 byte sequences so all Unicode characters encode and decode accurately.

Is my input data sent to any server?

'No. Everything is processed directly inside your browser tab using JavaScript TextEncoder and TextDecoder. Nothing is transmitted over the internet.

Related tools