Base64 Encoder & Decoder

Encode or decode Base64 text. UTF-8 safe by default. Optional URL-safe variant. Runs entirely in your browser — nothing is uploaded.

Runs 100% in your browser — nothing is uploaded.Use this in a chain
Base64

How to use

  1. 1
    Pick a direction

    Encode text → Base64, or paste Base64 to decode back to text.

  2. 2
    Pick a variant

    Standard Base64, or URL-safe (base64url) for JWTs and query strings.

  3. 3
    Paste your input

    Any UTF-8 text or Base64 payload. The result updates as you type.

  4. 4
    Copy the output

    Copy the result, or share the URL — your input travels with it.

Examples

Encode plain text
Input
ToolVaults
Output
VG9vbFZhdWx0cw==
Standard Base64 with padding.
Encode Unicode / emoji
Input
café ☕
Output
Y2Fmw6kg4piV
UTF-8 safe — naive btoa() would throw on non-ASCII characters like é and ☕.
URL-safe (base64url) for a JWT
Input
{"alg":"HS256","typ":"JWT"}
Output
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
No padding, "-" and "_" instead of "+" and "/". Ready to drop into a JWT header.

Frequently asked

Is it safe to paste sensitive data here?

Yes — the tool runs entirely in your browser. Your text never leaves your device. That said, you should never share Base64-encoded secrets since Base64 is not encryption.

What is URL-safe (base64url)?

A variant that replaces "+" with "-" and "/" with "_", and drops the "=" padding. Used in JWTs, JOSE, and URLs where the standard characters cause problems.

Why does the naive btoa() function break on emoji?

btoa() assumes each character is one byte, which breaks for anything above U+00FF. This tool encodes the input to UTF-8 bytes first, so any Unicode input round-trips correctly.

Related tools