Encode any file as Base64 or a data URL, and decode it back. Runs entirely in your browser — nothing is uploaded.
6 answers to what people ask most about the File to Base64.
Drop it on the File to Base64 tab. The encoded text appears straight away, ready to copy or save as .txt.
Base64 with a prefix such as data:application/pdf;base64, so browsers can use it directly in src, href or CSS url() values.
Base64 turns every 3 bytes into 4 text characters, so the output is about 33% larger, plus line breaks if you add them.
Email (MIME) wraps Base64 at 76 characters and PEM certificates and keys at 64. Most other uses want no line breaks.
Base64URL swaps + and / for - and _ and drops the = padding, so the text is safe in URLs and JSON Web Tokens.
Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so your files are processed on your device and never uploaded. It works on phones and computers alike.
Something not working? Tell us and we'll fix it.
Report an issue