画像をここにドロップ
A single image file of any common format
1 ファイルあたり最大 10 MB
出力形式
出力待ち
左側にファイルを追加し、オプションを調整して、上部バーから実行すると結果の比較とダウンロードができます。
すべての計算と変換は V8 エンジンまたは WebAssembly によりブラウザ内でローカルに実行されます。ファイルやテキストがデバイスの外に出ることはありません。
概要
Base64 encoding is useful when an image has to travel inside HTML, CSS or JSON instead of as a separate file. This tool encodes the original file bytes, so the data URI keeps the exact source format and quality.
使い方
形式と仕様
FAQ
What is the difference between a data URI and raw Base64?
A data URI includes the `data:<mime>;base64,` prefix and can be used directly as an img src or CSS url(). Raw Base64 is just the encoded payload, intended for an API field or a JSON document where you supply the MIME type separately.
How much bigger does the image get?
Base64 represents 3 bytes as 4 characters, so output grows by roughly 33% plus the small prefix. The tool shows the exact character count so you can decide whether inlining is worth it.
When should I avoid data URIs?
For large images, a normal file is better: data URIs cannot be cached independently, block HTML parsing and bloat your markup. They are best for small icons, placeholders and single-file demos.
Does the image get re-encoded?
No. The original file bytes are encoded, so a JPEG stays a JPEG and a PNG stays a PNG, exactly as supplied.
制限事項
- Base64 adds about 33% overhead; keep inlined images small.
- Very large files produce long strings that can be slow to copy or paste in some editors.
- The tool encodes; it does not decode Base64 back into a downloadable file.