Three different problems that get lumped together as 'make this image smaller'
"Make this image smaller" can mean three different things, and confusing them leads to worse results than necessary. Compression reduces file size while keeping the same pixel dimensions. Resizing changes the pixel dimensions themselves. Conversion changes the file format entirely. Most real tasks need one specific operation, and knowing which one actually solves your problem saves a lot of trial and error.
Compression reduces file size without changing how many pixels the image has. For JPEG and WebP, this mostly means adjusting the quality setting, which controls how aggressively the format discards fine detail — higher compression means smaller files but more visible artifacts, especially around sharp edges and text. PNG compression works differently since PNG is lossless: a PNG compressor can still shrink the file meaningfully by optimizing the internal encoding, but it can't discard detail the way JPEG quality settings do.
Compression is the right tool when the image already displays at the size you want, but the file itself is too large for its use case — a product photo that's 8MB when a web page really only needs a few hundred kilobytes.
Resizing changes the actual pixel dimensions — a 4000×3000 photo becomes 1200×900, for instance. This matters because serving an image at 4x the display size wastes bandwidth even if it's well-compressed; a phone screen showing a 400px-wide thumbnail doesn't benefit from receiving 4000 pixels of detail it will just scale down. Resizing before compressing (rather than only compressing) is usually the bigger bandwidth win for images that are being displayed smaller than their native resolution.
A good resize tool preserves aspect ratio by default (avoiding stretched or squashed output) and lets you specify either a target width, target height, or a percentage scale.
Different formats trade off differently:
Converting a photo from PNG to JPEG or WebP when it doesn't need transparency is one of the single most effective ways to shrink an image's file size, since PNG's lossless compression is fundamentally less efficient for photographic content than either lossy format.
A simple decision path: if the image needs transparency, use PNG or WebP. If it's a photograph with no transparency needs, use JPEG or WebP. If it's a simple graphic, logo, or screenshot with flat colors and sharp edges, PNG (or lossless WebP) avoids the blurring artifacts JPEG introduces around hard edges. When browser support allows it, WebP is close to a strict improvement over both JPEG and PNG for web use, since it covers both use cases at a smaller file size.
A related but distinct need is converting an image directly into a Base64 data URL — a text string that represents the image inline, without a separate file. This is useful for embedding small icons or logos directly into CSS or HTML (avoiding an extra HTTP request for a tiny file), or for including an image inside a JSON payload where only text fields are supported. It's generally only worth doing for small images — a data URL is roughly 33% larger than the original binary file, so embedding a large photo this way costs more than it saves.
Photos frequently contain more than what's visually obvious — EXIF metadata can include the exact GPS coordinates where a photo was taken, the device it was taken on, and a timestamp. Uploading images to a server-side compression or conversion tool means that metadata (and the image itself) is transmitted somewhere you don't control, even for something as simple as shrinking a file for an email attachment. Browser-based tools using the Canvas API and WebAssembly can perform compression, resizing, and format conversion entirely locally.
Does resizing an image down and then back up recover the lost detail? No — once pixels are discarded during a downscale, they can't be recovered by scaling back up; the result will just look blurrier at the larger size.
Is WebP always better than JPEG? For file size and quality, generally yes, though very old browsers and some software still lack WebP support, which is worth checking if your image needs to work everywhere.
Does converting a photo to PNG improve its quality? No — if the photo started as a JPEG, any compression artifacts are already baked into the pixels; converting to a lossless format afterward just preserves those artifacts at a larger file size rather than improving anything.
DataBench offers a full client-side image toolkit: Compressor, Converter, Resizer, and Image → Base64. All processing happens locally using your browser's Canvas API — images are never uploaded anywhere.