{"content":{"intro":"Image to Base64 converts a picture into text, a Base64 data URL, so it can be embedded directly inside HTML, CSS, JSON or an email template instead of being linked as a separate file. You can copy it as a data URL, raw Base64, a ready-made img tag or a CSS background rule.","sections":[["When embedding makes sense","Embedding is useful for small images such as icons, tiny logos and placeholders, because the browser doesn't need an extra request to fetch them. For large photos it's usually worse: Base64 is about 33% bigger than the original file, and embedded images can't be cached separately by the browser."],["Your original file, untouched","The tool reads your file directly and encodes its exact bytes, so a JPG stays a JPG and quality is identical. It isn't re-compressed or converted on the way."],["A note on email","Some email clients, including Gmail, don't display images embedded as data URLs. For email newsletters, linking images hosted on a web server or attaching them is more reliable."]],"faqs":[{"q":"What's the difference between a data URL and Base64?","a":"A data URL is Base64 with a prefix that tells the browser the file type, like data:image/png;base64,… Use the data URL in HTML or CSS, and plain Base64 when an API asks for just the encoded data."},{"q":"Why is the Base64 text larger than my image?","a":"Base64 uses 4 characters for every 3 bytes, so it's about a third larger than the original file."},{"q":"Is there a size limit?","a":"Images up to 5 MB can be converted here, though embedding anything over about 100 KB is rarely a good idea."}]},"copy":{"explain":"Encoding reads the file's exact bytes and writes them as Base64, so the image isn't re-compressed. Decoding works out the image type from the start of the Base64 text when there's no data: prefix, draws the picture and lets you save it as a file.","example":"A 206 KB JPG becomes a 275 KB Base64 string (+33%). Copy it as a data URL, plain Base64, an &lt;img&gt; tag, a CSS background or Markdown. Switch to &quot;Base64 → Image&quot;, paste a data URL or bare Base64, and the picture appears with its size and a Download button.","intro":"Image to Base64 converts a picture into text so it can be embedded directly in HTML, CSS, JSON, Markdown or an email template, and turns Base64 text back into an image you can see and download. Choose the output style with one tap and copy or download the result.","sections":[["When embedding makes sense","Embedding is useful for small images such as icons, tiny logos and placeholders, because the browser doesn't need an extra request to fetch them. For large photos it's usually worse: Base64 is about 33% bigger than the original file, and embedded images can't be cached separately."],["Decoding Base64 back to an image","If you find a data:image/… string in code or an API response, switch to &quot;Base64 → Image&quot; and paste it to see what it is. Bare Base64 without the prefix works too: PNG, JPG, GIF, WebP and SVG are recognised from their first characters."],["A note on email","Some email clients, including Gmail, don't display images embedded as data URLs. For newsletters, linking images hosted on a web server or attaching them is more reliable."]],"faqs":[{"q":"What's the difference between a data URL and Base64?","a":"A data URL is Base64 with a prefix that tells the browser the file type, like data:image/png;base64,… Use the data URL in HTML or CSS, and plain Base64 when an API asks for just the encoded data."},{"q":"Can I turn Base64 back into an image?","a":"Yes. Choose &quot;Base64 → Image&quot;, paste the text and tap Download image."},{"q":"Is there a size limit?","a":"Images up to 5 MB can be converted, though embedding anything over about 100 KB is rarely a good idea."}]},"feat":[["Both directions","Image to Base64 text, and Base64 back to an image."],["Copy as you need","Data URL, plain Base64, an <img> tag, CSS or Markdown, with one tap."],["Copy or download","Take the result either way."],["Stays on your device","Nothing is uploaded."]],"faqx":[{"q":"Why is the Base64 version bigger than the image?","a":"Base64 turns every 3 bytes into 4 text characters, so the result is about 33% larger than the original file. A 206 KB JPG becomes roughly 275 KB of text. That is why it suits small images better than large photos."},{"q":"When should I embed an image as Base64?","a":"Embedding works well for small icons, logos and placeholders of a few KB, since it saves a separate download. For larger images a normal file link is usually better, because browsers can cache it. The tool warns you when an image is over 100 KB."},{"q":"How do I use Base64 as a CSS background?","a":"Choose CSS under Copy as and you get a ready line like background-image: url(&quot;data:image/png;base64,...&quot;); to paste into your stylesheet. Add background-size or background-repeat as needed, just as you would with a normal image file."},{"q":"Do Base64 images work in emails?","a":"Not reliably. Several popular email clients, including Gmail, do not display images embedded as data URLs. For email templates, hosting the image and linking to it, or attaching it, is usually more dependable."},{"q":"Does converting to Base64 reduce image quality?","a":"No. The file's exact bytes are encoded without re-compressing, so decoding gives back an identical image. If you need a smaller string, compress or resize the image first, then convert it."},{"q":"Why does my Base64 text not decode to an image?","a":"Usually part of the string is missing, so copy the whole thing including the end, which may finish with = signs. Spaces and line breaks are removed automatically. Text that is Base64 but not an image, such as a PDF, will not display here."},{"q":"Which image types can it decode without a data: prefix?","a":"It recognises PNG, JPEG, GIF, WebP and SVG from how the Base64 text starts (PNG data, for example, always begins with iVBOR). If it cannot tell, it tries PNG. With a full data URL, the type in the prefix is used."},{"q":"Is my image uploaded when I convert it?","a":"No. The image is read and encoded in your browser, and decoding also happens on your device, so the file and the Base64 text are not sent to a server. You can copy or download the result straight away."}]}