Home›Image Tools›Image to Base64 Converter

Image to Base64

Turn an image into a Base64 string you can paste straight into HTML, CSS or JSON.

Also searched as: convert image to base64 · png to base64 · base64 encode image

🔒 Your photo is processed inside your browser and is never uploaded.

Image to Base64 — what it is for

Base64 turns an image file into plain text so it can be embedded directly inside HTML, CSS, JSON, an email template or a mobile app bundle — no separate file and no extra request. Choose a small image: the text is about 33% larger than the file.

How to use it

  1. Choose the image.
  2. Pick the output: a data URI for src, a ready HTML <img>, a CSS rule or the raw Base64.
  3. Tap Copy and paste.

Going the other way? Use Base64 to image. For text, see the Base64 encoder/decoder.

Frequently asked questions

What is a Base64 image?

An image file converted into text characters (A–Z, a–z, 0–9, +, /) so it can be placed inline in code instead of linked as a file.

Why is the Base64 bigger than the file?

Base64 uses 4 characters for every 3 bytes, so the text is about 33% larger. Use it for small icons, not big photos.

Is the image uploaded?

No — the conversion runs in your browser.

More free tools

Compress Image to KBShrink a photo to 20KB, 50KB, 100KB or any size you needImage ToolsImage ResizerResize by pixels, cm, inches or % — with a KB limitImage ToolsPassport Size Photo Maker3.5 × 4.5 cm photo + printable 4×6 sheetImage ToolsPhoto & Signature Resizer for FormsSSC, IBPS, PAN, UPSC, NEET presets — exact cm & KBImage ToolsImage ConverterJPG, PNG, WEBP, BMP — convert any image formatImage ToolsPNG to JPGConvert PNG to JPG with a white backgroundImage Tools