Base64 encoder
Encode text or files to Base64 format
Characters: 0
Max file size: 5 MB
Characters: 0
01
What is Base64?
Base64 is a way to write any data, text or binary, with only 64 safe characters: A to Z, a to z, 0 to 9, plus and slash, with equals signs as padding. It lets you put images, files or special characters into places that only accept plain text, such as JSON, email, data URLs, HTTP headers and configuration files.
This encoder converts text as UTF-8, ASCII or Latin-1, and encodes files up to 5 MB that you drop on the page or choose with Upload file. The URL-safe option uses minus and underscore instead of plus and slash and drops the padding, as described in RFC 4648. Text and files are encoded in your browser and never uploaded.
02
How to encode text or a file to Base64
- Type or paste text into the input, or drop a file up to 5 MB.
- Choose the text encoding; UTF-8 suits most text.
- Turn on URL-safe if the result goes into a URL or a file name.
- Copy the Base64 output, or download it as a text file.
03
Base64 encoder FAQ
- Is Base64 encryption?
- No. Base64 is an encoding, not encryption. It uses no key, and anyone can decode it in a second, for example with the Base64 decoder. Use it to carry data through text-only systems, never to hide passwords or secrets. If data must stay private, encrypt it first, then encode the result if you need text.
- What is URL-safe Base64?
- Standard Base64 uses plus and slash, which have special meanings in URLs and file names. URL-safe Base64, defined in RFC 4648, replaces them with minus and underscore and usually drops the trailing equals signs. JWTs use this variant. Turn on URL-safe when the output goes into a URL, a query string or a file name.
- Why is Base64 output larger than the input?
- Base64 turns every 3 bytes into 4 characters, so the output is about 33% larger than the input, plus up to two padding characters. A 3 MB image becomes about 4 MB of text. Text with accented letters or emoji grows more, because UTF-8 uses several bytes for those characters before encoding.
- Are my files uploaded when I encode them?
- No. Files are read and encoded in your browser, and text is encoded in this tab as you type. Nothing you encode is sent to a server or stored, and downloads are created on your device. The 5 MB limit applies to files you add to the page.
04