# Image to Base64 converter that runs in your browser

> Drop an image and copy it as Base64, a data URI, an HTML <img> tag, a CSS background, JSON, Markdown or a favicon link. Free, no account, nothing uploaded. New accounts get 4 free credits once, after verifying their email address. Enough for one AI alt text (4 credits).

base64img.com is an independent site and is not affiliated with Google, Recraft or any model provider.

## How it works

1. Drop, paste or pick up to 20 images (PNG, JPG, GIF, WebP, SVG, AVIF, BMP or ICO; up to 25 MB each), or fetch one by URL.
2. Pick an output: raw Base64, data URI, HTML, CSS, JSON, Markdown or favicon. Options: URL-safe alphabet, 76-character lines, SVG as a UTF-8 data URI.
3. Read the size verdict: under 10 KB inline it, over 32 KB link the file. Shrink to WebP or JPEG at a target size if needed.
4. Copy or download a .txt. To go the other way, paste Base64 on the decoder and save the original, PNG or JPG.

## Outputs and decoding

Encoding and decoding run in the browser; images are never uploaded for conversion. The decoder accepts raw or URL-safe Base64, data URIs, CSS url() and <img> wrappers, detects the real format from the bytes, adds missing padding, and shows the position of a bad character or a cut-off string.

## Optional AI extras

With credits and the user's consent, an image can be uploaded for alt text (Gemini, Google; 4 credits), background removal (Recraft; 10 credits) or upscale of small images (Recraft Crisp Upscale; 12 credits). Inputs and results are deleted after 24 hours. Asset Pipeline runs an extra on up to 50 images at once.

## Models behind each credit

Alt text is written with Gemini (Google). Background removal uses Recraft. Upscale uses Recraft Crisp Upscale. Conversion uses no model. base64img.com is independent and not affiliated with Google or Recraft.

## Converters

- [Base64 to image](https://base64img.com/base64-to-image): Paste Base64 or a data URI and get the image back with its real format, size and pixels; save as the original, PNG or JPG.
- [PNG to Base64](https://base64img.com/png-to-base64): Convert a PNG to Base64 or a data URI with HTML, CSS and JSON snippets; transparency kept.
- [Base64 to PNG](https://base64img.com/base64-to-png): Turn Base64 or a data URI into a PNG file, whatever format it holds.

## Pricing

## Plans (monthly or yearly, cancel any time)

- **Inline: $5.33 a month** — 1,617 credits each month, valid 31 days.
- **Sprite Sheet: $16.73 a month** — 5,742 credits each month, valid 31 days.
- **Asset Pipeline: $35.47 a month** — 12,836 credits each month, valid 31 days.
- **Inline yearly: $53.27 a year** — 1,617 credits each month, valid 31 days.
- **Sprite Sheet yearly: $167.30 a year** — 5,742 credits each month, valid 31 days.
- **Asset Pipeline yearly: $354.70 a year** — 12,836 credits each month, valid 31 days.

Plans differ in how many AI extras can run at once (see the pricing page). Batch AI (up to 50 images in one run) and exports of more than 20 files in one ZIP are on Asset Pipeline only, checked on the server. Converting images to and from Base64 is free on every plan and without an account; it runs in your browser.

## Credit packs (one-time, credits never expire)

- **Byte Crate: $31.63** — 5,936 credits, never expire.
- **Kilobyte Crate: $54.37** — 10,830 credits, never expire.
- **Megabyte Crate: $97.13** — 20,010 credits, never expire.

Free: New accounts get 4 free credits once, after verifying their email address. Enough for one AI alt text (4 credits).

## What a credit buys

| Job | Credits |
| --- | --- |
| Image to Base64, Base64 to image, snippets, SVG mode, shrink | 0 |
| Alt text (Gemini, Google), per image | 4 |
| Background removal (Recraft), per image | 10 |
| Upscale (Recraft Crisp Upscale), per image | 12 |

AI inputs and results are deleted after 24 hours. Failed, timed-out or refused jobs are refunded automatically. Refunds: packs within 14 days of purchase, a plan's first payment within 5 days, while no more than 10% of the purchase's credits are used; the unused part is refunded pro-rata. Renewal charges are not refundable.

## Questions

### Is the image to Base64 converter free?

Yes. Converting images to Base64 and back is free, with no account and no daily cap, because it runs in your browser. Only the optional AI extras use credits: alt text 4, background removal 10, upscale 12. New accounts get 4 free credits once, after verifying their email address.

### Is my image uploaded anywhere?

No. Encoding, decoding, the size check and shrinking all run on your device. An image only leaves it if you run an AI extra and confirm you may use the image; that copy is deleted after 24 hours.

### Why is the Base64 string bigger than my file?

Base64 writes every 3 bytes as 4 characters, so it is about 33% larger, plus a few characters for the data URI prefix. Gzip on your server wins some of that back.

### Should I inline images as data URIs?

For small images, yes: under about 10 KB a data URI saves a request. Above 32 KB it bloats your HTML or CSS and can't be cached on its own, so link the file. The verdict on each result tells you which side you are on.

### SVG: Base64 or URL-encoded?

Usually URL-encoded UTF-8: it is shorter and still readable. The SVG switch shows both lengths and marks the smaller one.

### My Base64 string won't decode. What's wrong?

Most often it was cut off when copied, or it has stray characters. The decoder accepts data URIs, URL-safe Base64, CSS url() and <img> tags, adds missing padding, and points to the exact position of a bad character.

### Which formats work?

PNG, JPG, GIF, WebP, SVG, AVIF, BMP, ICO and TIFF are detected from the bytes, whatever the file name says. Images up to 25 MB each, 20 at a time.

### What do the AI extras do, and which models run them?

Alt text comes from Gemini (Google) for 4 credits. Background removal uses Recraft (10 credits) and upscale uses Recraft Crisp Upscale (12 credits). A failed run is refunded. base64img.com is independent and not affiliated with these companies.

### What does the Asset Pipeline plan add?

Encoding and decoding run in your browser and stay free. Asset Pipeline adds batch AI (alt text, background removal or icon upscale on up to 50 images at once) and one-click export of more than 20 files as a ZIP, CSV or CSS sheet.


---

Source: https://base64img.com/ · Site index for AI agents: https://base64img.com/llms.txt · Full content: https://base64img.com/llms-full.txt
