Base64 Decoder & Encoder

Decode Base64 strings back to text, or encode any text to Base64. Supports UTF-8, URL-safe Base64, and line-wrapped output. All processing happens in your browser.

Base64 Decoder โ€” Convert Base64 to Text

Base64 decoding converts a Base64-encoded string back into its original form. Paste a Base64 string (it will look like a long sequence of letters, numbers, and +/= characters) and the decoded text appears instantly. The decoder handles both standard Base64 (RFC 4648) and URL-safe Base64 (which replaces + with - and / with _).

Base64 Encoder โ€” Convert Text to Base64

Switch to the Encode tab to convert any text, JSON, XML, HTML, or string into Base64. This is useful for embedding binary data in text formats, creating data URIs for images, encoding API credentials (HTTP Basic Auth uses Base64), and preparing data for JWT tokens. The encoder uses the browser's built-in btoa() function with full UTF-8 support.

What Is Base64?

Base64 is a binary-to-text encoding scheme that represents data using 64 printable ASCII characters โ€” the letters A-Z and a-z, digits 0-9, and the characters + and /. The = character is used for padding. Base64 encodes 3 bytes of binary data into 4 characters, making encoded strings about 33% larger than the original. Base64 is not encryption โ€” it is trivially reversible without any key.

URL-Safe Base64

Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 (Base64url, RFC 4648 ยง5) replaces these with - and _, making the encoded string safe to use directly in URLs and filenames. JWT tokens use URL-safe Base64 without padding. Toggle the "URL-safe" option above to switch between formats.

Common Uses of Base64

JWT tokens: the header and payload of a JWT are Base64url encoded. Data URIs: images embedded in HTML/CSS use data:image/png;base64,โ€ฆ. HTTP Basic Auth: credentials are sent as Authorization: Basic base64(user:password). Email attachments: MIME encoding uses Base64 for binary attachments. API payloads: binary data is often Base64-encoded to safely transmit in JSON.

Paste the Base64 string above with the Decode tab selected. The decoded text appears instantly. Toggle "URL-safe" if the string uses - and _ instead of + and /.
Switch to the Encode tab and type or paste your text. The Base64 output appears immediately. All encoding happens in your browser โ€” nothing is sent to any server.
A scheme that represents binary or text data using 64 printable ASCII characters. Commonly used in JWT tokens, data URIs, email attachments, and API authentication. Not encryption โ€” easily reversible.
A variant that replaces + with - and / with _ so the encoded string is safe in URLs. JWT tokens use URL-safe Base64. Toggle the option above to switch between formats.
No. Base64 is an encoding scheme, not encryption. Anyone with a Base64 decoder (like this tool) can read the original data. For secure storage, use actual encryption like AES.