图片转Base64 Members

将图像转换为 Base64 字符串或数据 URI,以便在 HTML 和 CSS 中使用。

This tool is available to registered members

Create a free account or sign in to use this tool. Registration is free and takes less than a minute.

Your data is processed in your browser and is not uploaded to our servers.

About the 图片转Base64

“图片转Base64”功能将图片编码为文本,以便直接嵌入到HTML、CSS、JSON或电子邮件中。您可以选择纯Base64字符串、数据URI、CSS背景规则或HTML图片标签。

How to use the 图片转Base64

  1. 请选择一张图片(大小不超过 10 MB)。
  2. 选择输出格式。
  3. 复制结果或将其下载为文本文件。

Frequently asked questions

什么时候应该使用 Base64 格式的图片?

适用于那些节省额外 HTTP 请求至关重要的小型图标和图片。大图片则更适合作为普通文件提供。

为什么 Base64 编码后的文本比文件本身还要大?

Base64 编码会使文件大小增加约 33%。