Encoder & Decoder

Base64 and URL encoding/decoding — everything happens in your browser.
Base64 Encode / Decode
Base64 is often used to encode binary data in text form. It handles Unicode correctly (UTF-8 first, then Base64).
URL Encode / Decode
Percent-encoding for URLs. Use Encode component for a single parameter value, and Encode full URL for an entire URL.
Privacy note: Encoding and decoding happen entirely in your browser. Nothing you type is sent to any server.

How Base64 and URL encoding work

Both Base64 and URL encoding solve the same problem: some data can't be safely carried through a channel designed for text. Base64 lets binary data ride through plain-text systems. URL encoding lets arbitrary characters ride through URLs. Neither is encryption — anyone can reverse either transformation instantly.

Base64 encoding

"Hi" (2 bytes) → "SGk=" (4 chars)

Base64 takes groups of 3 bytes (24 bits) and splits them into 4 groups of 6 bits. Each 6-bit value maps to one of 64 printable characters: A–Z, a–z, 0–9, plus + and /. The equals sign = is used as padding when the input length isn't a multiple of 3.

A side effect: Base64 output is always about 33% larger than the input, because 3 bytes become 4 characters. That's the cost of making arbitrary data safe to embed in text-only systems.

The most common places you'll see Base64: data URLs in HTML and CSS (image embedding), JWT authentication tokens, Basic Auth headers, and any API that accepts or returns binary files as strings.

URL encoding

"hello world" → "hello%20world"

URLs can only contain a limited set of safe characters. Spaces, ampersands, question marks, and most non-ASCII characters have special meaning or aren't allowed. URL encoding (also called percent-encoding) replaces these characters with a % followed by two hexadecimal digits representing the character's UTF-8 bytes.

There are two variants: encodeURIComponent encodes everything that isn't a URL-safe character, so it's meant for single values (like a query parameter). encodeURI preserves URL structure (slashes, colons, question marks), so it's meant for whole URLs. The tool offers both.

Why this tool handles Unicode correctly

The browser's built-in btoa() and atob() functions work on binary strings, not Unicode text. Pasting an emoji or accented character into a naive Base64 encoder can produce garbage or throw an error. This tool first UTF-8-encodes the text, then Base64-encodes the resulting bytes. Decoding reverses the process, so accented characters, emoji, and non-Latin scripts all round-trip correctly.

Common questions

← Back to Your Online Helper