Apa yang dilakukan Image to Base64 and Data URI?
Image to Base64 and Data URI membantu mengodekan atau mendekodekan konten langsung di browser serta menjelaskan hasil dan batasannya dengan jelas. Kemampuan yang telah diverifikasi: Image to Data URI, Base64 to image, MIME preservation, Local file download.
Use Data URIs only for small embedded assets
Base64 expands binary data by about one third before the data-URL prefix and cannot be cached independently when embedded in HTML or CSS. Prefer ordinary image files for large or reusable assets.
Bagaimana cara menggunakannya?
- For Image → Data URI, choose an image and select Convert image.
- For Data URI/Base64 → Image, switch Conversion mode and paste the encoded value.
- Check the MIME type or preview before copying the Data URI or downloading decoded bytes.
Contoh masukan dan keluaran nyata
Decode a MIME-aware PNG Data URI
Masukan
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=Keluaran
MIME: image/png
Download: decoded-output.pngThe data URL supplies both the media type and Base64-encoded bytes needed to reconstruct the local Blob.
Kesalahan umum dan perbaikannya
| Gejala | Kemungkinan penyebab | Perbaikan |
|---|---|---|
| Decode reports an invalid character error. | The payload contains non-Base64 characters, lost padding, or a copied header that is not a data URL. | Provide raw Base64 or a complete data:[type];base64,... value without surrounding quotes. |
| The decoded preview is broken even though bytes were produced. | The declared MIME type does not match the encoded file or the bytes are not a valid image. | Verify the source file signature and use the correct image media type. |
Important behavior of Image ↔ Base64
Batas khusus alat ini: Base64 increases payload size by roughly one third and is usually unsuitable for large web images.
Standar dan referensi implementasi
- RFC 4648 — Base-N Encodings (opens in a new tab)Defines the Base64 alphabet and padding rules.
- RFC 2397 — The data URL scheme (opens in a new tab)Defines data URLs and their media-type and Base64 markers.
Image ↔ Base64 — FAQ
Does the Image ↔ Base64 upload my input?
No. Processing runs in the current browser tab, and the page does not send tool input to a KitLumi processing endpoint.
What input does the Image ↔ Base64 accept?
It accepts an image file, Data URI, or raw Base64 image payload. The workspace checks the input and reports malformed or unsupported values before it produces a result.
What does the Image ↔ Base64 produce?
It produces a MIME-aware Data URI or decoded image file. Copy and download controls appear when the output format supports them.
What limitation should I know?
Base64 increases payload size by roughly one third and is usually unsuitable for large web images.
Apa yang berubah?
Pembaruan substantif: Image ↔ Base64: Added Image to Data URI, Base64 to image, MIME preservation, Local file download, responsive controls, explicit runtime disclosure, and task-specific examples and limitations.