Image Tools

Image to Base64

Encode an original PNG, JPEG or WebP image as a data URL or raw Base64. Preview the image, copy the complete output or download a text file, entirely in your browser.

Your content stays on your device Free, with no account
Your image, as portable text Original bytes · no uploads

No file selected.

Static PNG, JPEG or WebP · up to 10 MiB and 40 megapixels

No image selected.

Data URL begins with data:image/…;base64,. Raw output has no prefix. Both use standard padded Base64 without inserted line breaks.

The preview is scaled for your screen. Encoding uses the original file bytes without resizing, compression or metadata removal. Base64 is an encoding, not encryption.

YOUR ENCODED IMAGE

Preview is capped at 50,000 characters. Copy and TXT download use the complete output.

Ready. Choose an image to begin.

Base64 text is generally larger than the binary file. The character count and size increase include the MIME prefix when selected. Original metadata remains part of the encoded file. Remove metadata before encoding if you do not want it included.

A FEW SIMPLE STEPS

How to use Image to Base64

  1. Choose or drop one static PNG, JPEG or WebP image up to 10 MiB.
  2. Choose a data URL with its image MIME prefix, or raw Base64 without a prefix.
  3. Select Encode image and review the image preview and output size.
  4. Copy full output or download TXT. Both contain the complete result even when the on-screen preview is truncated.
PRIVATE BY DESIGN

Why use this tool?

Your image is never uploaded to any server; all encoding is completed locally in your browser. Original file bytes, including metadata, are preserved. A local worker keeps encoding separate from the interface, and no account or saved image history is needed.

Tool inputs stay in your browser. Only your theme preference is saved on this device.

A few things worth knowing

Does Base64 compress or encrypt my image?

No. Base64 represents binary bytes as text. It generally increases size by about one third, with more overhead for tiny files and data URL prefixes. Anyone with the encoded text can decode the original file, including its metadata.

Which files can I encode?

Static PNG, JPEG and WebP images up to 10 MiB, 40 megapixels and 16,384 pixels per side. The browser must be able to decode the image for preview. SVG, GIF, AVIF, HEIC and detected animated PNG/WebP are not supported in this version.

What is the difference between raw Base64 and a data URL?

Raw Base64 contains only the encoded bytes. A data URL adds a prefix such as data:image/png;base64, so a compatible application knows the content type. Both use standard padded Base64 without inserted line breaks.

Is the full result available for large images?

Yes. The text preview displays at most 50,000 characters to keep the interface responsive. Copy full output and Download TXT use every character, without added line breaks. If clipboard access fails for a truncated preview, download TXT instead.

Does encoding change image orientation or metadata?

The image preview follows the browser’s orientation handling and is scaled for display, but encoding preserves the original bytes exactly. It does not resize, re-encode or remove metadata. Remove metadata before encoding if it should not be included.

What happens if I change files or stop encoding?

Changes clear old results and downloads. Stop terminates the worker and discards partial output. Encoding has a five-second response limit. Clear and leaving the page release application-held image data.