Image to Base64
Turn an image into a Base64 string you can copy.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Encode the original bytes of one validated static JPEG, PNG or WebP image as plain Base64 or a data URL using its detected MIME type. The image is not resized or re-encoded; Base64 text is typically about one-third larger than the binary file.
How to use this tool
- Choose one saved JPEG, PNG or WebP image. The original stays on your device.
- Choose a full data URL for an HTML/CSS image source, or Base64 only when another system supplies the MIME prefix. Select “Generate Base64”.
- Preview the start of the text, then copy or download the complete result. Check the receiving system’s text-size limit before embedding a large image.
Supported inputs and limits
One static JPEG, PNG or WebP image up to 20 MiB and 16 million pixels. Animated images and SVG are not supported. Large encoded text can be cumbersome to paste or embed.
Worked example
Example input
pixels.png
Example options
{}Example output
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAADICAYAAADGFbfiAAAC60lEQVR4nO3XsQ2AMBAEQRvRf8umAUg2sZFmKrjktfq5xlgDeDWdB3y6dg8A4J8EBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABI7t0D4Gxz7l4Ap/KBAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQCAgAiYAAkAgIAImAAJAICACJgACQPE4MBJJrZADfAAAAAElFTkSuQmCC
When something does not work
Choose a valid static JPEG, PNG or WebP image within the stated byte and pixel limits. If the resulting text is too large for its destination, resize or compress the image first, then encode that new file.
Frequently asked questions
Are my files uploaded?
No. Files and tool input are processed in your browser. Moving around the site can keep a temporary workspace in the same tab. Refreshing or closing the tab clears it, so download results you want to keep.
What should I check in this result?
Choose the required output form: a data URL begins with the detected MIME type and can be used as an image source; Base64 only contains the encoded bytes. Copy and download contain the complete text even when the on-page preview is shortened. Decoding either form must reproduce the original image bytes exactly.