File to Base64
Encode any file as Base64: images, audio and arbitrary binary data
点击或拖拽文件到此处
支持任意类型文件
About this tool
The binary to Base64 tool turns any file into an encoded string:
- Any file type: images, audio, video, documents and anything else
- Two formats: the bare Base64 string or a Data URI with the MIME type in front
- Image preview: pictures render immediately from the Data URI
- Size comparison: original and encoded sizes side by side
- Copy: grab the output in one click
When to use it
- Embed images in HTML or CSS as Data URIs
- Carry binary data inside JSON
- Inline an attachment in email
- Encode binary payloads for an API
Encoding notes
- Size growth: Base64 output is about 4/3 of the original, roughly 133 percent
- Data URI: the form is
data:[mimetype];base64,[data] - Browser limits: very large files can fail on memory pressure
- Privacy: conversion happens locally and the file is never uploaded