Base64

Encode and decode text or files to Base64

Plain Text Input
Base64 Output

Frequently Asked Questions

What is Base64 encoding?

Base64 converts binary data into a text-safe format using 64 printable ASCII characters. It's used to embed images in HTML/CSS, send binary data through text-only protocols, and encode authentication tokens.

Why does Base64 make data larger?

Base64 represents 6 bits per character while the original binary uses 8 bits per byte. This means encoded output is approximately 33% larger than the input. That's the tradeoff for text-safe transport.

Is my data uploaded to a server?

No. All encoding and decoding happens locally in your browser. Nothing is transmitted to any external server — your data stays completely private.

Can I encode files to Base64?

Yes. Upload any file up to 10MB (images, PDFs, fonts) and get the Base64-encoded string. This is useful for embedding small assets as data URIs directly in HTML or CSS.

What is the difference between Base64 and URL-safe Base64?

Standard Base64 uses + and / characters which are not safe in URLs. URL-safe Base64 replaces these with - and _ respectively, making the output safe for query parameters and filenames.

Can I decode any Base64 string?

Yes. Paste any valid Base64-encoded string and get the original text or binary content. The decoder handles standard Base64, URL-safe variants, and strings with or without padding (= characters).

Base64 Encode & Decode: Convert Text and Files to Base64 Online

Text or binary data is converted into Base64 format and back by this encoder and decoder. Base64 is used by developers to embed images in CSS, send binary attachments through APIs, encode authentication tokens, and store binary data in JSON or XML. Text can be pasted to encode it, or a Base64 string can be pasted to decode it — everything is processed locally in your browser with zero server communication.

Why does Base64 make data larger?

Base64 represents 6 bits of data per character, while the original binary uses 8 bits per byte. This means Base64-encoded data is about 33% larger than the original. That's the tradeoff for text-safe transport. For small payloads (icons, tokens, config values) the size increase is negligible.

Common use cases

Base64 is encountered in data URIs for embedding images, HTTP Basic Authentication headers, JWT token payloads, email attachments (MIME), and API request bodies that need to include binary files. If JWT tokens are being worked with specifically, our dedicated JWT decoder can be used for inspecting the payload.

File encoding support

Beyond text, entire files (images, PDFs, fonts) can be encoded to Base64. This is handy for embedding small assets directly in HTML or CSS without extra HTTP requests. For image-specific encoding with preview support, our Image to Base64 converter is available.