Loading…

Developer tools10.04

Base64 Encoder and Decoder

Encode text to Base64 or decode Base64 back to text, with full UTF-8 support for accents and emojis plus the URL-safe base64url variant.

Back to Developer tools
Mode
Uses - and _ instead of + and /, and drops the “=” padding. This is the format JWTs use.

This runs entirely in your browser. We don’t store any data.

Base64 output

How to use it

  1. 01

    Choose whether you want to encode text or decode Base64.

  2. 02

    Type or paste your content. The result appears instantly.

  3. 03

    If you need it for a URL or a token, check the base64url option.

  4. 04

    Click “Swap” to run the result back the other way and double-check it.

How it works

Base64 represents binary data using 64 safe characters (A–Z, a–z, 0–9, + and /). Every 3 bytes turn into 4 characters, so the output is about 33% larger than the input. It’s used to embed data in emails, JSON, URLs and HTML.

Before encoding, your text is converted to UTF-8 bytes, so accented letters and emojis come back intact when you decode. That’s not the case if you call the browser’s btoa function directly.

Base64 is not encryption: anyone can decode it. Don’t use it to hide passwords.

Examples

  • Text with accents and emojis

    “Crème brûlée 🍮” encodes to Q3LDqG1lIGJyw7tsw6llIPCfja4= and decodes back exactly.

  • Reading a JWT

    Paste the middle section of a JWT (the part between the two dots) and decode it to see its JSON payload.

  • Basic auth header

    “user:pass” encodes to dXNlcjpwYXNz, the format HTTP Basic authentication expects.

Frequently asked questions

Does Base64 keep my data secure?

No. It’s just a way of writing data as text characters, and anyone can decode it in a second. To protect information, you need to encrypt it.

What are the “=” signs at the end?

They’re padding that makes the length a multiple of 4. They can be left off (as in base64url), and this tool adds them back automatically when decoding.