Base64 Encoder / Decoder

Encode & Decode Base64 Instantly

Standard and URL-safe Base64. Auto-detects encode vs decode. Runs entirely in your browser.

Plain text
0 chars
Base64 output

Encoding and decoding run entirely in your browser using the Web API. No data is sent to any server.

What is Base64 and when do you need it?

Base64 encoding converts arbitrary data into a safe ASCII string. It appears everywhere in web development: JWT tokens, data URIs, HTTP Basic Auth headers, email attachments (MIME), and API payloads that need to carry binary data as text.

URL-safe Base64 is a variant that replaces the + and / characters with - and _, making the encoded string safe to include in URLs and filenames without percent-encoding.

Frequently asked questions

Base64 is an encoding scheme that converts binary or text data into a string of ASCII characters using 64 printable characters (A–Z, a–z, 0–9, +, /). It is widely used to safely transmit data in URLs, email bodies, HTTP headers, and JSON payloads.

Standard Base64 uses + and / characters which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, and omits the trailing = padding. Use URL-safe Base64 for JWT tokens, URL parameters, and filenames.

No. Base64 increases the size of data by approximately 33% because every 3 bytes of input become 4 ASCII characters. It is an encoding scheme for safe transport, not compression.

No. Base64 is reversible encoding, not encryption. Anyone can decode a Base64 string without a key. Do not use Base64 to secure sensitive data — use proper encryption algorithms instead.

Base64 strings only contain A–Z, a–z, 0–9, +, and / (or - and _ for URL-safe), and are usually padded with = at the end. Use the Auto-detect button in this tool to automatically pick the correct mode.

Yes. Encoding and decoding use the browser's native btoa() and atob() Web APIs. Your data is never transmitted to any server.

Related Tools

More browser-based utilities you might find useful.