Encode to Base64 format

To encode binaries (like images, documents, etc.) use the file upload form a little further down on this page.

Encode files to Base64 format

0 Click (or tap) here to select a file
The maximum file size is 192MB.
Working...
Please wait until the encoding process is complete.
Success!

About Base64 encoding

Base64 encoding converts arbitrary bytes into a string built from 64 printable ASCII characters (A-Z, a-z, 0-9, +, and /), padded with = when needed. Each group of 3 input bytes becomes 4 output characters, which is why Base64 output is roughly 33% larger than the original data - a normal, expected trade-off for text-safe transport, not a sign of a problem.

Encoding is useful whenever binary or special-character data needs to pass through a channel that only reliably supports plain text: embedding an image inside CSS with a data URL, attaching a file to an email, sending binary payloads inside JSON, or building HTTP Authorization: Basic headers.

Encoding options on this page

  • Character set - choose the source encoding (UTF-8 by default) before conversion.
  • Base64URL - swaps +// for URL-safe characters, for use in URLs, filenames, and tokens.
  • Line chunking - wraps output at 76 characters, matching the MIME standard used by email clients.

Base64 encoder FAQ

When should I use Base64?

Use Base64 when binary data must travel through a text-only format, such as JSON, email, or a data URL. It increases size, so it is not a replacement for file storage.

What is the difference between Base64 and Base64URL?

Base64URL replaces + and / with URL-safe characters and usually omits padding. Choose it for URL parameters, tokens, and systems that require URL-safe values.

Why is the encoded output longer than my original text?

Base64 turns every 3 bytes of input into 4 output characters, so encoded data is roughly 33% larger than the source. This overhead is expected and is the trade-off for safe text-only transport.

What's the difference between encoding text and encoding a file?

Both use the same algorithm. The text form encodes what you type or paste using the selected character set; the file form reads the file's raw bytes directly, which is required for images, PDFs, and other binary formats.

Will special characters or non-English text encode correctly?

Yes, as long as the correct source character set is selected; UTF-8 covers virtually all languages and symbols. If output looks wrong, confirm the charset matches how your original text is encoded.

Is this tool free, and does it store what I encode?

Yes, it is free with no account required. Encoding runs locally in your browser; your input is not intentionally sent to or stored by our servers. See our Privacy Policy for details.