Image to Base64 Converter β Free Online
Convert an image to Base64, or restore an image from a Base64 string. Copy a data URI or raw Base64, preview decoded images and download the original format. Free and local, with no account needed.
Choose an image or drop it here
PNG Β· JPG Β· GIF Β· WebP Β· BMP Β· AVIF Β· up to 10 MB Β· local processingOriginal image bytes are preserved. Decoding restores the original format; it does not convert formats. Up to 10 MB and 32 million pixels. GIF preview may animate.
Related tools and guides
How It Works
Convert an image to Base64 for an HTML image, a CSS background or an API that accepts image data as text. Select Encode and choose a PNG, JPG, GIF, WebP, BMP or AVIF image. The converter creates a data URI with the correct image type. Copy the full URI for an image URL, or copy raw Base64 when you only need the encoded payload.
To convert Base64 to an image, select Decode and paste the raw string or image data URI. Select Decode image, check the preview and download the restored file. A data URI begins with an image type and ;base64, before the payload. You can paste standard Base64 with line breaks or omitted trailing padding; URL-safe Base64, HTML tags and JSON responses are not accepted.
Encoding preserves the original file bytes. A transparent PNG keeps its transparency, and a GIF retains its animation data. Decoding restores the original format rather than converting everything to PNG. Base64 adds roughly one third to the payload size, so it does not compress an image or automatically make a website faster. Small embedded images can be useful in a self-contained document; use ordinary image files when separate loading and caching suit the page better.
The converter is free, needs no account and processes the image locally in your browser. Each original or decoded file can be up to 10 MB, with up to 32 million pixels, and your browser must be able to read its format. SVG and other unsupported formats are excluded. Base64 is reversible text encoding, so the output does not hide or encrypt the image.
Features
- βImage to Base64 and Base64 to image in one tool
- βSeparate copy actions for raw Base64 and image data URIs
- βPNG, JPG, GIF, WebP, BMP and AVIF support
- βOriginal image bytes, transparency and animation data preserved
- βPreview and download in the original image format
- βStandard Base64 with line breaks or omitted padding
- βLocal processing, free without an account
How to Use This Tool
- Choose Encode for an image file or Decode for a Base64 string.
- Choose an image up to 10 MB, or paste raw Base64 or an image data URI.
- For encoding, copy the data URI or raw Base64. For decoding, select Decode image.
- Check the decoded preview and download the image in its original format.
Perfect For
- βEmbed a small image in a self-contained HTML document
- βPrepare an image payload for an API that accepts Base64
- βRestore an image from a Base64 string
- βCreate an image data URI for a CSS background