🚧 We’re making Tools Pasal better. Found a broken tool or have an idea? Tell us →
Tools Pasal

Base64 Encode / Decode

Encode text to Base64 or decode it back — instantly, Unicode-safe, with a URL-safe option. Everything runs in your browser.

Base64

Unicode-safe (Nepali text, emoji and any UTF-8 work correctly). Decoding accepts URL-safe Base64 and missing padding. Runs entirely in your browser — nothing is uploaded.

How to use it

Choose Encode or Decode, paste your text, and copy the result. For encoding, tick URL-safe if the output goes into a URL, filename or JWT. Decoding auto-detects standard and URL-safe Base64 and fixes missing padding.

What Base64 is (and isn't)

Base64 represents data using 64 ASCII characters (A–Z, a–z, 0–9, + /) so binary or Unicode data can pass through text-only channels. It is encoding, not encryption — it adds no security, since anyone can decode it. Common uses: data URLs, embedding small images, JSON/JWT payloads, basic-auth headers and API tokens.

Sources & notes

Implements the RFC 4648 Base64 and Base64URL alphabets; Unicode handled via UTF-8 (TextEncoder/TextDecoder). Computed locally in your browser.

Working with JSON too? Pair this with the JSON Formatter, or convert number bases with the Number System Converter.

Frequently asked questions

What is Base64 used for?

Base64 turns binary or text data into plain ASCII so it can travel safely through systems that only handle text — data URLs, embedding images in CSS/HTML, JSON/JWT payloads, email attachments and API tokens. It is encoding, not encryption: anyone can decode it, so never use it to hide secrets.

Does it handle Nepali text and emoji?

Yes. This tool encodes through UTF-8 bytes, so Devanagari (नेपाली), emoji 🙏 and any Unicode round-trip correctly. The plain browser btoa() function would corrupt them.

What is URL-safe Base64?

Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces them with - and _ and drops the = padding, so the result is safe to put in a URL or filename. JWTs use this variant. Tick the URL-safe box when encoding; decoding accepts either form automatically.

Is Base64 secure?

No. Base64 is reversible encoding, not encryption — it provides zero security. Don't Base64 a password or token expecting it to be hidden; anyone can decode it instantly.

Is my data private?

Yes. Encoding and decoding happen entirely in your browser; nothing is sent to a server.