ImageToolMage

Encode

Image to Base64

Turn an image into a data URL you can paste into HTML, CSS, or JSON — or decode one back to a file.

This file can contain faces, documents, GPS tags, or screenshots. Processing happens in your browser and ImageToolMage does not upload the image to our server. Your screen, clipboard, and extensions can still leak it.

Base64 is encoding, not encryption. Do not treat the string as a way to hide a photo.

Choose one file with the file picker, or drop it on the box. This is not drag-only.

Drop one image here. The file picker above is the keyboard-accessible path.

Encode a file or paste a data URL. Encoding is not encryption.

How it works

Encoding uses the file bytes and a MIME type from magic bytes or the file type. Decoding accepts a data URL or raw Base64.

Input and output

Input is a file or a string. Output is a string or a reconstructed file. SVG is accepted as text when it is a real image/svg+xml payload.

Examples

CSS background

Small icons can be inlined as data:image/png;base64,…

Decode

Paste a data URL to preview it and download the reconstructed file.

How to use this tool

  1. Choose an image to encode, or paste a data URL / Base64 string to decode.
  2. Copy the raw Base64, data URL, or HTML snippet.
  3. Or download the decoded file.

Limitations

  • Base64 is about one-third larger than the original bytes.
  • Very large strings can freeze the tab. A size guard rejects extreme input.
  • This is not a text-only Base64 workbench for tokens or documents.

Questions

Is Base64 encryption?

No. Anyone with the string can reconstruct the file. It is encoding, not protection.

Does this convert JPG to PNG?

No. It encodes or decodes the bytes you already have.

Related tools