🖼️ 图片 Base64 编解码Image ⇄ Base64

把图片转成 Base64 data URI(用于内联到 HTML/CSS),或把 Base64 还原为图片预览下载。支持拖拽上传,全程本地处理,图片绝不上传。Convert an image to a Base64 data URI (for inlining in HTML/CSS) or back to an image. Drag & drop supported; fully local.

① 图片 → Base64① Image → Base64

② Base64 → 图片② Base64 → Image

使用说明How to use

怎么用How to use
  1. 选择或拖入图片Pick or drop an image
  2. 得到 Base64 data URIGet a Base64 data URI
  3. 或粘贴 Base64 还原为图片下载Or paste Base64 to restore and download

示例:logo.png → data:image/png;base64,…Example: logo.png → data:image/png;base64,…

全程在你的浏览器本地完成,文本不会上传服务器。Runs entirely in your browser; your text is never uploaded.

data URI 形如 data:image/png;base64,……,可把小图标、背景图直接写进 HTML/CSS,减少额外请求。注意:Base64 体积比原图约大 33%,仅适合小图内联;大图仍建议用独立文件。A data URI looks like data:image/png;base64,… and lets you embed small icons/backgrounds directly in HTML/CSS, saving extra requests. Note Base64 is ~33% larger than the binary — best for small images; keep large images as files.