FileOpens

Documents

All document converter →Microsoft PublisherApple PagesApple KeynoteMicrosoft WorksWordPerfectAppleWorksLotus Word ProMS Write, StarOfficeEvernote notes

Spreadsheets

All spreadsheet converter →Apple NumbersSPSS to Excel or CSVMicrosoft AccessMicrosoft ProjectPrimavera P6Asta PowerprojectGanttProject, ProjectLibreSureTrak, Primavera P3Lotus 1-2-3, Quattro ProWorks databases

Drawings & sites

All cad file viewer →Visio to PDFVisio viewerAutoCAD DXFCorelDRAW to PDFPageMaker to PDFFreeHand to PDFWeebly to WordPress

E-mail & chats

All email to pdf →WhatsApp to PDFPrint WhatsApp messagesWhatsApp chat exportText messages (SMS)Print text messagesSlack export viewerSkype chat historyDiscord chat exportTelegram to PDFInstagram DMs to PDFMessenger to PDFEML to PDFOutlook MSG to PDFMailbox to PDFMBOX viewerVirgin Media email closingHughesNet email shutdownOutlook PST to PDFOutlook for Mac OLMOLM to Outlook for WindowsGmail to PDF

PDF tools

All pdf tools →Merge PDFSplit PDFCompress PDFCompress PDF to 100 KBDelete PDF pagesRotate PDFExtract PDF pagesReorder PDF pagesCrop PDFAdd page numbersWatermark PDFSign PDFProtect PDFUnlock PDFOCR PDFFlatten PDFPDF to grayscaleInvert PDF colorsRemove PDF metadata

Convert PDF

All pdf converter →PDF to WordWord to PDFPDF to ExcelExcel to PDFPDF to PowerPointPowerPoint to PDFJPG to PDFPNG to PDFImage to PDFPDF to JPGPDF to PNGPDF to textHTML to PDFPDF to EPUBPDF to PDF/APDF to TIFFPDF to SVG

Images

All image tools →Image converterCompress imageJPG to PNGPNG to JPGJPEG to JPGCompress JPEGCompress PNGGIF to PNGPNG to GIFGIF to JPGJPG to GIFGIF makerRemove backgroundBackground eraserMake background transparentWhite background for photoRemove white backgroundResize imageCrop imageRotate imageFlip imageBlur imagePixelate imageBlack and white photoInvert image colorsMerge imagesWatermark imageAdd text to imageRemove EXIF dataEXIF viewerChange DPIImage to Base64Base64 to imageMP4 to GIFVideo to GIFGIF to MP4GIF compressorPNG to SVGJPG to SVGImage to SVGSVG to PDFImage to textPNG to DXFSVG to DXFDXF to SVGHEIC to JPGHEIC to PNGHEIC to PDFHEIC viewerWebP to PNGWebP to JPGWebP to GIFWebP to PDFPNG to WebPJPG to WebPAVIF to PNGAVIF to JPGJFIF to JPGJFIF to PNGSVG to PNGSVG to JPGPNG to ICOICO to PNGBMP to JPGBMP to PNGTIFF to JPGTIFF to PNGPSD viewerPSD to PNGPSD to JPGPSD to PDFAI to SVGAI to PNGOpen AI fileEPS to PNGDDS to PNGTGA to PNGTGA to JPGRAW to JPGCR3 to JPGCR2 to JPGNEF to JPG

Free tools

All file viewer →Universe shutting downOpen winmail.datGEDCOM viewerArc to ChromeKML / KMZ viewerKMZ to CSVKML to GPXGPX editor3MF to STLOpen a .p7m fileXPS to PDFMHT to PDFCHM to PDFEPS to PDFPS to PDFEPUB validatorTIFF to PDFDjVu to PDFLIT to PDF or EPUBMOBI to PDFEPUB to PDFCBR readerCBR to PDFODT to Word or PDFHWP to PDF or WordODS to ExcelODP to PowerPointICS calendar viewerICS to CSVVCF to Excel

Free Your pictures are not uploaded

Image to Base64

Convert an image to Base64 here: each picture becomes a data URI, plain Base64, a ready HTML <img> tag or a CSS background line, shown in a box with a copy button. It works with PNG, JPG, SVG, WebP, GIF and ICO, and the encoding happens in your browser.

or drop them here. PNG, JPG, SVG, WebP, GIF, ICO. Nothing is uploaded.

A picture encoded to Base64 by FileOpens

A PNG logo as an HTML img tag: an example made with FileOpens

greenleaf-logo.pngdata URI

A PNG logo as an HTML img tag

  • 66 KB picture, 88 K characters
  • Copy with one click

A sample logo we made ourselves, with made-up names and data, opened in this tool and shown as it came out. Your own files stay on your device.

How to convert an image to Base64

  1. Step 1

    Choose the pictures

    Icons, logos, small graphics, email images.

  2. Step 2

    Pick the output

    Data URI, Base64 only, HTML tag or CSS line.

  3. Step 3

    Copy or save

    Copy with one click, or save as text files.

What Base64 images are for

Base64 writes binary data as plain text, using only letters, digits, + and /. A picture encoded this way can live inside an HTML page, a CSS file, a JSON response, an email template or a configuration file, with no separate image file to host or link. Developers use it for small icons and logos, loading spinners, email signatures, single-file reports and test data.

Image to Base64: data URI, HTML or CSS

A data URI looks like data:image/png;base64,iVBORw0… and can be pasted wherever an image address is expected. "Base64 only" gives just the encoded text, for APIs and JSON fields that ask for it. The HTML option gives a complete tag with the picture's width and height, and the CSS option a background-image line. The media type is taken from the file's content, not just its name, so a PNG renamed to .jpg still gets the right type.

When not to use Base64

Base64 text is about 33% larger than the image file, cannot be cached separately by browsers, and makes pages heavier to parse; there is no fixed size limit here, but it pays off for small images of a few kilobytes; for photos and anything over 100 KB, a normal image file is faster. Shrink a picture first with compress image or resize image if you must embed it. Many email programs block or strip data URIs, so test email templates before sending.

Decode it again

To turn a Base64 string back into a picture, for example one copied from an API response, a log or browser developer tools, use Base64 to image. Very long results are shown partly on screen and saved in full with "Save as text files".

Using the result

In HTML, paste the img tag where the picture should appear; in CSS, paste the background line into a rule; in JavaScript or JSON, use the data URI or plain Base64 as a string. For SVG icons, Base64 is not the only option: an SVG can also be put into HTML directly, which is usually smaller. Several pictures can be encoded at once; each has its own box and copy button, and "Save as text files" stores all of them in one ZIP for later. The original picture files are not changed in any way, and you can switch the output type at any time to copy another form.

Private

Pictures are encoded in your browser and never uploaded, which matters for internal assets and unreleased designs.

More free image converters

Questions about image to Base64

What is a data URI?

A link that contains the picture itself, starting with data:image/…;base64,.

How much bigger is Base64?

About a third larger than the image file.

Can I encode SVG?

Yes, SVG, PNG, JPG, WebP, GIF and ICO all work.

Can I get an HTML tag?

Yes, choose "HTML tag" and copy it.

Why does my Base64 start with data:image/png?

That prefix tells browsers what kind of file follows; choose "Base64 only" to leave it out.

Can I encode several pictures at once?

Yes, each gets its own box with a copy button.

Are my pictures uploaded?

No, everything happens in your browser.