Image to Base64 reads an image file and gives you its full data URL, for example data:image/png;base64,iVBOR..., ready to copy. You can paste it straight into an HTML img tag, a CSS background or a JSON field so the picture travels inside the code.
Base64 writes binary data using 64 plain text characters. A data URL adds a short prefix naming the file type, so browsers can display the picture without a separate file or request.
The encoding is about one third larger than the original file, because every 3 bytes become 4 characters. That is fine for small icons, logos and email signature images, but large photos are better linked as normal files.
Pick an image
Choose a PNG, JPG, SVG, WEBP, GIF or other image file.
Encode it
Press Run Image to Base64; the data URL appears in a text box with its length.
Copy and paste
Click Copy data URL and paste it into your HTML, CSS, JSON or code.
Example: a 6 KB logo
A 6,000-byte PNG logo becomes a data URL of about 8,000 base64 characters plus the 22-character prefix data:image/png;base64, which you can drop into an img src attribute.
ওয়েব ডেভেলপার বা প্রোগ্রামারদের অনেক সময় ছবিকে টেক্সট হিসেবে HTML, CSS বা JSON-এর ভেতরে বসাতে হয়। এই টুল ব্রাউজারেই ছবিকে পুরো data URL (data:image/png;base64,...) বানিয়ে দেয়, এক ক্লিকে কপি করা যায়। Base64 টেক্সট মূল ফাইলের চেয়ে প্রায় এক-তৃতীয়াংশ বড় হয়, তাই ছোট আইকন বা লোগোর জন্যই এটা উপযুক্ত।
কপি করা লেখাটা img ট্যাগের src-এ বসিয়ে দিন।
প্রতি ৩ বাইট ৪টি অক্ষরে লেখা হয়, তাই প্রায় ৩৩% বড় হয়।
Put it in the src attribute of an img tag, exactly as copied, starting with data:image. The browser shows the picture without loading any other file.
Base64 represents every 3 bytes with 4 text characters, so the result is about 33% larger. That is the cost of carrying an image as text.
Usually no. Large data URLs make HTML and CSS heavy and cannot be cached separately. Keep base64 for small icons and logos, ideally a few KB.
Yes. The copied text is a complete data URL. If an API wants only the raw base64, delete everything up to and including the comma.
No. Your browser reads the file and encodes it locally, so the picture stays on your device.
More like this in Image tools. Need a version built for your business? Ask us.