DocumentsImagesMediaPDF Tools

Base64 Encode/Decode

Encode or decode Base64 in your browser — no data sent to any server.

Processed in your browser — no text sent to any server

Base64 in seconds

API-ready

Encode credentials, tokens, and payloads for HTTP Basic auth and Authorization headers.

100% private

Encoding and decoding happen in your browser. Your data never leaves your device.

Full UTF-8 support

Correctly handles accents, special characters, and any Unicode-based language.

Instant results

Conversion is immediate for any text length. No waiting, no queues.

Three steps, no hassle

1

Paste your text or data

Enter the text you want to encode, or the Base64 string you want to decode. Works with any plain text content.

2

Choose the operation

Select 'Encode' to get a Base64 string, or 'Decode' to recover the original text. The result appears instantly.

3

Copy the result

Use the copy button to send the result to your clipboard with one click. Ready to paste into your API, JWT, or wherever you need it.

Got questions?

No. Base64 is an encoding scheme, not encryption. It converts binary data into ASCII text for safe transport, but offers no confidentiality. Anyone who sees a Base64 string can decode it immediately without any key.

Base64 maps every 3 bytes of input to 4 ASCII characters. Since each ASCII character takes 1 byte, the output is 4/3 the size of the original — roughly 33% larger. This is the trade-off for universal text compatibility.

Yes, provided you convert the binary file to a string first. For images, the common pattern is a Data URI: 'data:image/png;base64,' followed by the Base64 string. Browsers can render these URIs directly in HTML and CSS.

Text is first encoded to UTF-8 bytes before applying Base64. This ensures non-ASCII characters like accents, umlauts, or Asian scripts are represented correctly. Decoding reverses this process to restore the original text.

A JWT has three parts separated by dots: header, payload, and signature. The first two are encoded in Base64url — a URL-safe variant that replaces '+' with '-' and '/' with '_'. You can decode the header and payload to inspect their contents, but the signature requires the secret key to verify.

Base64: what it is, what it's for, and how to encode or decode

Base64 is an encoding scheme that transforms arbitrary binary data into a sequence of printable ASCII characters. It was designed to solve a specific problem: text-based protocols like SMTP (email) or HTTP can only reliably transport text, but much of the data we work with is binary. Base64 acts as a bridge between the two worlds.

The most common use cases today are: HTTP Basic authentication (where username:password is Base64-encoded for the Authorization header), JWT tokens (whose header and payload are Base64url-encoded), embedding images as Data URIs in HTML and CSS, and encoding email attachments in MIME format. It is also used in digital certificates and cryptographic keys in PEM format.

It is essential to understand that Base64 provides no security whatsoever: anyone can decode a Base64 string without a key or password. If you need to protect data, you must encrypt it with AES, RSA, or another algorithm before encoding it as Base64. Convertir.ai processes everything locally in your browser, so your sensitive data never travels to any server.