IMAGE TO BASE64 CONVERTER & DECODER

Image to code.
Back without loss.

Turn an image into Base64, a data URI or an embed snippet. Restore encoded images with their original bytes intact.

Local processingByte-for-byte verificationFive output formats
A DIFFERENT WAY TO CARRY AN IMAGE

Image ↔ Base64

Start with your image.

Drop a file here, choose one below or paste an image from your clipboard.

Still PNG, JPEG or WebP · Up to 2 MiB
12 million pixels · 8192 pixels per side

Choose an image to begin.

Base64 is not encryption. Original metadata stays in the output. Inspect or remove metadata first →

Your image. In another form.

A preview, exact file details and a verified download will appear here.

BASE64 / DATA URI / HTML / CSS / JSON
01 / EMBED

Put a small image in your code.

Create a data URI or a ready-to-copy HTML or CSS snippet. Set useful alt text for an HTML image and check your destination’s data URI limits.

02 / RESTORE

Get the image back.

Paste encoded image data or open a text/JSON export. The decoder checks the format and restores the original PNG, JPEG or WebP.

03 / VERIFY

Keep every original byte.

Each result passes a byte-for-byte encode/decode comparison. View the byte count and SHA-256 fingerprint when your browser supports it.

Understand your output.

Does conversion change my image?

No. Encoding and decoding preserve the original file bytes, including metadata and colour profiles. Each result passes a byte-for-byte encode/decode check. The preview may be smaller and browser colour rendering may vary, but the downloaded image is not resized or recompressed.

Which inputs are supported?

Use one still PNG, JPEG or WebP image up to 2 MiB, 12 million pixels and 8192 pixels per side. Paste raw standard Base64, raw Base64URL or an image data URI, or open a UTF-8 text file up to 3 MiB. JSON exports with a dataUri string are also supported; other JSON fields are ignored and recalculated. Animated images, SVG, GIF, HEIC and RAW are not supported. Convert other formats first.

What can I copy or download?

Choose raw Base64, a complete data URI, an HTML img snippet with escaped alt text, a CSS background-image declaration or JSON with image details. Copy full output and Download text always include the complete value. HTML and CSS snippets download as plain text. Download image restores the original validated bytes.

Can I use Base64URL or remove padding?

Yes, for raw Base64 output. You can switch to the URL-safe alphabet, remove trailing padding or wrap lines at 76 characters. Data URIs and embed snippets always use standard padded Base64 without line breaks. Raw input may omit unambiguous padding; malformed padding, mixed alphabets and non-zero unused padding bits are rejected.

Why is the encoded output larger?

Base64 uses four characters for each group of three bytes, rounded up. It is about one third larger for most images, before compression. The displayed size increase uses the exact raw Base64 length. A data URI or snippet adds a small header. Large images are usually better served as separate files.

Why does the text preview look incomplete?

To keep the interface responsive, output over 20,000 Unicode code points initially shows only its first 20,000 Unicode code points. The preview is clearly labelled. Show full text or Select full text reveals everything; Copy full output and Download text include everything regardless of the preview setting.

Is Base64 private or encrypted?

Base64 is an encoding, not encryption. Anyone with the output can restore the image. Image conversion runs locally; no image or conversion history is automatically saved. Original metadata, including possible location information, remains in the output. Use the metadata remover first if needed. Normal site analytics and feedback services may still load.

Will the snippet work on every website?

No. Content Security Policy, editor filters, email software and destination size limits may block data URIs. Test the complete snippet where you plan to use it. The SHA-256 value, when available, identifies the original bytes; it does not prove authenticity or safety.