图片转 Base64

把图片编码成 Base64 数据 URI——可直接粘贴到 CSS 或 HTML 中。在浏览器中运行。

正在加载工具…

如何把图片转换成 Base64

放入一张图片,cutbg 会把它编码成 Base64 数据 URI,你可以直接复制到 CSS 的 background-image、img 的 src 或 JSON 数据中——无需上传,全部在你的设备上完成。

我的图片会被上传吗?

不会——编码在你的浏览器中进行;图片永远不会离开你的设备。

相关工具

常见问题

What is a Base64 data URI?
A text encoding of your image you can paste directly into CSS or HTML, so the image loads with no separate file or request.
Which formats can I encode?
Any image the browser can read — PNG, JPG, WebP, GIF, SVG and more. The data URI keeps the original format.
Is my image uploaded?
No — the file is read and encoded locally in your browser; it never leaves your device.