Skip to content

Encoding converters

File to Base64

Convert a file to Base64 online: drop any local file (images, PDFs, audio, video, archives) and get Base64 or a ready-to-paste data URI. Files never leave your browser — unlike server-side converters.

100% private · everything runs in your browser

Drop any file and get its Base64 — plus a ready-to-use data URL. Images report their dimensions, PDFs their page count, and the hex view shows the leading bytes so you can sanity-check what you are embedding. Unlike most converters, nothing is uploaded: your file never leaves the browser.

Pick a file

Drop a file here

Any file works — images, PDFs, audio, video, archives. It is read locally in your browser and encoded to Base64 instantly; nothing is uploaded.

How to use

File to Base64, step by step

  1. 01

    Drop a file onto the box (or click to choose one). It is read locally with the File API — no upload, no progress bar to a server, because there is no server.

  2. 02

    Read the result card: file name, detected type, exact size and the Base64 character count — plus dimensions or page count when the format carries them.

  3. 03

    Copy the raw Base64 or the full data:… URL, or switch to the hex view to inspect the file’s first bytes.

FAQ

Frequently asked questions

Only your device memory. Server-based tools cap you at 1–100 MB because files travel to them; here the file is read in your browser, so a 200 MB video works on a machine that can hold it.

Base64’s fixed 33% overhead: 3 bytes become 4 characters. A 1.5 MB image produces about 2 MB of Base64 — that is the format, not a bug, and it is why data URLs are only recommended for small assets.

The data URL prepends data:<mime>;base64, — the complete, paste-ready form for <img src>, CSS and email HTML. The raw Base64 is for APIs, databases and anywhere the type is already known.

The one detected from the file’s bytes. Your operating system’s guess (from the file extension) is shown alongside, but the data URL uses the verified type — so a misnamed file still produces a correct embed.

Yes — copy the data URL here, or use the Base64 to Data URL tool, which formats it as a plain URI, an <img> tag or a CSS background-image rule.

Completely. The File API reads the file in your browser; there is no upload endpoint in this site at all. Sensitive documents, medical images and internal files never leave your machine — verifiable in your browser’s network tab.

Related tools

esc

Tools

Pages

↑↓ navigate↵ open⌘K

Keyboard shortcuts

Same shortcuts everywhere — ⌘ on macOS, Ctrl on Windows and Linux.