Tiny Online Tools logoTiny Online Toolssearchツールを検索…grid_viewすべてのツール
ホームchevron_right画像ツールchevron_right画像をBase64に変換画像をBase64に変換

画像をBase64に変換

画像ファイルをBase64エンコード文字列に変換します。

upload_file

クリックして選択 またはここにファイルをドラッグ&ドロップ

変換する画像を選択

対応形式: image/*

関連ツール

Base64から画像へ変換

Base64から画像へ変換

Base64文字列を画像ファイルにデコードします。

SVGをCSS背景に変換

SVGをCSS背景に変換

SVGコードをCSS background-image用データURLに変換します。

AVIF を JPG に変換

AVIF を JPG に変換

最新の AVIF 画像をブラウザ上で汎用的な JPG 形式に変換します。

AVIF を PNG に変換

AVIF を PNG に変換

最新の AVIF 画像をブラウザ上でロスレスな PNG 形式に変換します。

重複行を削除

重複行を削除

テキストから重複した行を削除します。

JSON 差分

JSON 差分

2 つの JSON オブジェクトを比較します。

キャンバスサイズ拡張ツール

キャンバスサイズ拡張ツール

各辺にパディングを追加して画像のキャンバスサイズを拡張します。単色または透明な塗りつぶし。完全プライベート。

apps

もっと見る

無料オンラインツールの全コレクションを見る。

Image to Base64

Embed images directly in your HTML, CSS, and JSON by 変換ing them to Base64 encoding. This technique eliminates separate image files for small graphics and icons.

Data URLs explained

Base64-encoded images can be embedded directly in HTML and CSS as data URLs. Instead of linking to an external file, you include the image data inline. This approach reduces HTTP requests for small images and ensures images load with the HTML document.

HTML and CSS integration

Embedded Base64 images work in HTML img tags (src attribute) and CSS background-image properties. Paste the data URL directly—no separate file ダウンロード required. This is particularly useful for small icons, placeholders, and inline graphics.

JSON and API responses

When APIs need to return images, Base64 encoding allows serialization in JSON フォーマット. This approach avoids separate image endpoints and simplifies API responses for single-item metadata that includes images.

Encoding options

The tool provides both the complete data URL (with MIME type prefix) and raw Base64 string. Use the data URL directly in HTML and CSS. Use the raw Base64 when your context requires just the encoded data.

Performance considerations

Base64 encoding increases data size by about 33% compared to binary. This tradeoff is worth it for tiny images and icons where HTTP request overhead exceeds the encoding penalty. For large images, separate files remain more efficient.

Practical applications

Embed favicons directly in HTML to avoid 404 errors, inline small SVG icons in CSS to reduce requests, encode profile pictures for JSON API responses, and 作成 self-contained HTML files with embedded graphics.