首页
Tom Utilities

图片转 Base64

编码与解码

将 PNG、JPEG、GIF、WebP 或 SVG 图片转换为可粘贴到 HTML 或 CSS 的 Base64 数据 URL。

使用方法

Embedding images as data URLs

Choose an image and the tool produces a data URL. Paste it into an img src attribute, a CSS background or a JSON payload.

  1. Select an image file.
  2. Wait for the preview and data URL.
  3. Copy the data URL.

常见问题

Is my image uploaded?

No, the conversion happens locally in your browser using the FileReader API.

What is the size limit?

There is no hard limit, but large images produce very long strings and should be optimised first.