Converter ng larawan papuntang Base64 (data URI)
I-encode ang isang larawan bilang Base64 data URI, purong Base64, CSS background o HTML img tag para sa mga email, CSS at code. Hanggang 10 MB.
Input
Tip: pindutin ang Ctrl + Enter para patakbuhin
Mga naka-save na settings
Sa ngayon, nasa Ingles lamang ang detalyadong tulong sa ibaba.
Tungkol sa tool na ito
Base64 turns binary data such as an image into plain text, so it can be embedded directly in HTML, CSS, JSON or an email template without a separate file. A data URI (data:image/png;base64,…) can be used anywhere a URL is expected.
This tool reads an image from your device and gives you a data URI, raw Base64, a ready-made CSS background-image rule or an HTML img tag. Base64 makes data about a third larger, so it is best for small icons and images rather than large photos.
Paano ito gamitin
- Choose an image up to 10 MB.
- Choose the output: data URI, raw Base64, CSS or HTML.
- Run it and copy the result into your code.
Paano gumagana ang kalkulasyon
The file is read with the FileReader API and encoded in Base64 (every 3 bytes become 4 text characters). The MIME type is taken from the file and used in the data URI prefix.
data:<mime>;base64,<bytes encoded in Base64> (≈ 4/3 × file size)Halimbawa
A developer embeds a 1.2 KB SVG arrow icon into a CSS file to avoid an extra request. The CSS output gives background-image: url("data:image/svg+xml;base64,…") of about 1.6 KB: roughly a third larger than the file, but one fewer download for the page.
Halimbawang input at resulta
Pumili ng file at pindutin ang Patakbuhin. Direktang mada-download mula sa iyong browser ang na-convert na file.
Mga limitasyon
- Images up to 10 MB.
- Large data URIs make HTML and CSS slower to parse and cannot be cached separately.
- No decoding of Base64 back to an image in this tool.
Huling na-update:
Mga madalas itanong
Why is the Base64 bigger than the image?
Base64 encodes 3 bytes as 4 characters, adding about 33% plus a little overhead.
Do email clients show data URIs?
Support is inconsistent; many clients block them. Attached or hosted images are more reliable.
Is my image uploaded?
No. Encoding happens in your browser.
Pag-aayos ng problema
The browser freezes on paste.
The string is very long; use a smaller image.
The image does not show in CSS.
Make sure the whole string, including the data: prefix, is inside url("...").
I need to decode Base64.
Use the Base64 encoder/decoder for text.
Privacy & Libreng gamitin
Sine-save ba ang aking input?
Nananatili sa tab na ito ang iyong input. Hindi namin natatanggap ang iyong mga file, na-paste na teksto o value ng kalkulasyon.
Libre ba ang tool na ito?
Oo. Walang kailangang signup o bayad.
Tingnan din
Mga susunod na hakbang
JPG sa PNG converter
I-convert ang mga JPG na larawan sa PNG sa iyong browser, hanggang 30 nang sabay-sabay. Pinapanatili ng PNG ang bawat pixel at sinusuportahan ang transparency, kaya ito ang pinakamainam para sa screenshot, logo at graphics.
Mga converter ng filePNG sa JPG converter
I-convert ang mga PNG na larawan sa JPG sa iyong browser, hanggang 30 nang sabay-sabay. Maliit ang JPG at nabubuksan kahit saan, kaya ito ang pinakamainam para sa mga larawan at pag-upload sa mga form; nagiging puti ang mga transparent na bahagi.
Mga converter ng fileWebP sa JPG converter
I-convert ang mga WebP na larawan sa JPG sa iyong browser, hanggang 30 nang sabay-sabay. Maliit ang JPG at nabubuksan kahit saan, kaya ito ang pinakamainam para sa mga larawan at pag-upload sa mga form; nagiging puti ang mga transparent na bahagi.
Mga converter ng file