Mã hóa
Data URI / Ảnh Base64
Mã hóa ảnh thành Data URI (data:image/…;base64,…) để chèn vào CSS/HTML, và giải mã Data URI hoặc Base64 thô trở lại thành tệp — tất cả ngay trong trình duyệt.
Bản xem trước ảnh sẽ hiện ở đây.
Câu hỏi thường gặp
When should I use a Data URI instead of a normal image file?
Data URIs are handy for small, frequently-used images like icons or logos where you want to avoid an extra HTTP request, for example embedding an image directly in CSS or inline HTML.
Are there downsides to using Data URIs for images?
Yes. They inflate the surrounding file size (roughly 33% larger than the raw image due to Base64), aren't cached separately by the browser like a real image URL, and many browsers and email clients impose practical size limits on how large a Data URI can be.
Does this tool upload my image anywhere?
No. The image is read and encoded entirely in your browser — it's never sent to a server.