FastOS 工具
FastOS 工具

圖片转 Base64

在线将圖片轉換為 Base64 字元串。快速将圖片編碼為 Base64 格式。

上傳圖片

功能介紹

The Image to Base64 tool converts images into Base64 strings you can embed directly in HTML, CSS, or JSON. It is useful for small icons, inline assets, and quick prototyping.

什麼時候用這個工具?

Use this tool whenever you want to inline an image: embedding icons in stylesheets, packaging assets in JSON, or testing image‑related APIs.

使用步驟

1

Upload an image

Drag and drop an image or use the upload button to select a file from your device.

2

Convert to Base64

The tool generates a Base64 string representation of the image entirely in your browser.

3

Copy the encoded string

Copy the Base64 output into your HTML, CSS, or configuration file as needed.

使用範例

Embedding a small icon in CSS

Convert a PNG icon to Base64 and use it as a `background-image` data URI to avoid extra HTTP requests.

常見問題

相關工具推薦