ToolPal

图片 ↔ Base64 转换器

将图片转换为 Base64 数据 URI 以嵌入 HTML 和 CSS。拖放或粘贴 Base64 进行解码。

🖼️

将图片拖放到此处或点击上传

最大文件大小: 10 MB

使用方法

将图片转换为 Base64 数据 URI 以嵌入 HTML 和 CSS。拖放或粘贴 Base64 进行解码。

  1. 1Upload an image by clicking the drop zone or dragging a file onto it.
  2. 2The tool converts the image to a Base64-encoded data URI instantly.
  3. 3Copy the full data URI string or just the raw Base64 portion.
  4. 4Use the data URI directly in HTML `<img src>`, CSS `background-image`, or JSON payloads.
  5. 5Optionally paste an existing Base64 string to preview and verify the decoded image.

主要功能

  • Converts any image (PNG, JPEG, GIF, WebP, SVG) to Base64 instantly
  • Outputs both the full data URI and the raw Base64 string separately
  • Preview the image alongside the encoded output for verification
  • Runs entirely in the browser — your images are never uploaded to a server
  • Supports drag-and-drop upload for a fast, seamless workflow

常见问题

了解更多