Image to Base64 Converter

Convert an image to a Base64 string for embedding in code, or decode one back to an image.

PNG, JPG, WebP, GIF or SVG, up to 20 MB

Your file never leaves this browser tab — everything runs locally on your device.

How to use image to base64 converter

  1. Choose "Image to Base64" or "Base64 to Image".
  2. To encode, choose or drag in an image and copy the Data URI or raw Base64 text.
  3. To decode, paste a data:image/...;base64,... string (or raw Base64 text) and click "Convert to Image".
  4. Download the decoded image if needed.

Common use cases

  • Embedding a small icon or image directly inside CSS or HTML without a separate file request.
  • Pasting an image into JSON, YAML or a config file that only accepts text.
  • Decoding a Base64 image string found in an API response or a browser's dev tools.

Related tools

Frequently asked questions