# Base64 Image Encoder

Inline a small picture so a web page, email template or README needs no separate file. Add the image and copy it in the form your code needs. To keep the string short, shrink the picture before encoding. The decode mode turns a Base64 string back into a downloadable image.

- Page: https://hexflowtools.com/image/base64
- Section: [Image](https://hexflowtools.com/image)
- Revised: 2026-11-25
- Cost: $0; works without an account; output carries no watermark
- Data handling: the visitor's own browser opens and processes each file; HexFlow servers never receive it

## Step by step

1. Choose encoding (picture to Base64) or decoding (Base64 to picture).
2. Add one or more pictures, or paste a screenshot.
3. Choose the output style, and optionally turn on “Shrink before encoding” with a size limit.
4. Copy the result, or save it as a .txt file.

## Common questions

### Which output styles are available?

A data URI, plain Base64, a CSS background rule, an HTML img tag and a Markdown image. A character count shows how long each one is.

### Why is the string so long?

Encoding adds about 33% to the size of the original file. Shrink the picture first and cap its width to cut it down. Inlining makes most sense for small icons.

### What about SVG files?

Turn on “URL-encode SVGs”. For vector files this is usually shorter and easier to read than Base64.

### Can I get a picture back from a Base64 string?

Yes. Switch to decoding, paste the string, and download the picture.
