Image to Base64

PNG, JPEG, WebP, or GIF up to 2 MiB. Your file stays in your browser.

Original bytes and metadata, including any location information, are preserved.

Encode an image as a data URI or raw Base64

Choose a PNG, JPEG, WebP, or GIF, select an output format, then copy the encoded text. A data URI starts with a media type such as data:image/png;base64, and includes the Base64 payload. Raw Base64 contains only that payload, for systems that request it separately. This encoder does not decode text or fetch remote images.

Original bytes and metadata stay intact

The file is read locally without uploading it to a PixTools server. Encoding preserves every byte, including animation and metadata such as camera details or GPS location. Base64 is reversible encoding, not encryption or metadata removal. Share the text only when you would share the original.

Size limits and embedding tradeoffs

Files must be no larger than 2 MiB (2,097,152 bytes). Raw Base64 uses 4 × ceil(bytes / 3) characters: 3 source bytes become 4 characters, so larger files grow by roughly one third. A data URI adds its prefix. Embedded images can suit small icons, but larger assets usually benefit from separate files that browsers can cache. Use Image Compressor or Image Resizer to make a smaller source first.

Supported types and copy troubleshooting

The browser-reported file type must be PNG, JPEG, WebP, or GIF. This check does not authenticate the file contents; a renamed or mislabeled file may not display in another application. SVG is unsupported. If Copy is unavailable, use Select all and your device’s copy command, such as Ctrl+C or Command+C. Reset clears the result. Visit PixTools help for other tools.