Base64 File

Files to base64, and back.

Drop in an image, font, or PDF and get a data URI, a CSS rule, or an img tag ready to paste. Paste base64 back and it detects the real type from the bytes, previews it, and hands you the file.

File

Drop a file here, or

Images, fonts, PDFs, anything. Never leaves your browser.

Output

Load a file and its base64 appears here.

Every format you actually paste

Raw base64, base64url, a full data URI, a CSS url() rule, or an <img>tag. Copy the one that matches where it's going.

Types read from the bytes

The content type comes from magic bytes, not the file extension or the data URI's own claim, so a mislabelled asset shows up as a mismatch instead of a silent bug.

Zero network

Files are read with the File API and encoded in a worker-free loop that handles large inputs. Nothing is uploaded, so internal assets stay internal.