Image Compressor
Shrink image file size while keeping it visually intact.
Convert an image to a Base64 string, or back again.
Turns an image into a Data URI or raw Base64 and back again — the usual route for inlining small icons.
Both directions: image → Base64 (as a full `data:` URI or the bare string) and Base64 → image (restores a preview and reports format, dimensions and size).
It shows the original file size next to the Base64 size: three bytes become four characters, so the result is **about 33% larger**. The `b64Size` figure includes the `data:...;base64,` prefix.
The decode side validates first (optional `data:` prefix, characters limited to the standard `A–Z a–z 0–9 + /` alphabet with up to two `=` of padding) and fails loudly instead of producing a broken image.
Pick an image, or paste a string
The file path encodes, the text path decodes — switch with the radio buttons at the top.
Choose the output shape
Use the `data:` URI when it goes straight into `src="…"` or CSS; use the bare string for JSON fields, logs and configs.
Copy or download
The encode direction gives text; the decode direction gives a preview and a downloadable image.
Only for small ones: icons, a few small logos, or when you must ship a single-file HTML. Do not inline large images — the payload grows by about a third, it **cannot be cached separately**, and it is parsed as part of the HTML or CSS, which delays first paint. Reference photos as files.
Decoding accepts standard Base64 only: the `+` and `/` alphabet with at most two trailing `=`. Two common mismatches: the URL-safe variant (`-` and `_`) must be mapped back to `+` and `/`, and the line-wrapped form found in email or MIME must have its newlines removed first.
Shrink image file size while keeping it visually intact.
Crop an image freely or to a fixed aspect ratio.
Resize an image to exact pixel dimensions.
Rotate or mirror an image.
Stitch several images into one, horizontally or vertically.
Convert common image formats into smaller WebP files.
Stamp a text or image watermark onto a photo.
Apply greyscale, blur and other filters to an image.