← All tools
// Encoding

File to Base64 Converter online

Convert any file to Base64 and generate a Data URI — runs entirely in your browser

Chunky Munster mascot
by
CHUNKY
MUNSTER
📂
Drop any file here or click to browse
Images, PDFs, fonts, audio, video, any file type
// Output
Drop or select a file above...

Converting a file to Base64 is useful for embedding images in HTML emails, CSS files, and data URIs; for storing binary files in JSON APIs; and for transferring binary data through text-only channels. This tool converts any file to its Base64 representation and generates a Data URI string ready to paste into your HTML or CSS.

What is a Data URI?

A Data URI embeds the file's binary content directly in a URL: data:image/png;base64,iVBORw0KGgo.... You can use this as the src attribute of an <img> tag, the url() in CSS, or as the href of an <a> download link — without any external file hosting.

Common Use Cases

Frequently Asked Questions

Is my file uploaded to a server?

No. This tool uses the browser's FileReader API to read the file locally and convert it to Base64. Nothing is sent to any server. Your file remains private.

Why is the Base64 output bigger than the original file?

Base64 encoding increases size by approximately 33% because it represents every 3 bytes of binary data as 4 ASCII characters. A 1MB image becomes about 1.37MB as Base64.