Bỏ qua đến nội dung chính
FreeOnlineTools Go
Tiếng Việt

Image Trình nén

Nén images trong trình duyệt của bạn to reduce file size. Adjust quality and download the optimized image. Free, hoàn toàn riêng tư, Không tải lên.

Local processing

What is Image Trình nén?

An image compressor reduces an image's file size by re-encoding it at a lower quality or with a more efficient codec. Smaller images load faster, save bandwidth, and improve page performance scores. The tool supports lossy compression (JPEG, WebP) where quality is traded for size, and lossless PNG optimization. All processing happens in the browser via the Canvas API — the image is never uploaded.

How It Works

The input image is drawn onto an offscreen <canvas> at its natural dimensions. The canvas is then re-encoded via toBlob() with a target MIME type (image/jpeg or image/webp) and a quality parameter (0-1). For PNG, the canvas re-encode applies lossless filtering. The resulting Blob is compared to the original; the user sees both sizes and the percentage saved before downloading. EXIF metadata is typically stripped during re-encode.

Common Use Cases

  • Optimizing web images — shrink hero photos and product images before uploading to a CMS
  • Reducing email attachment size — compress photos to stay under attachment limits
  • Preparing social-media images — meet platform size recommendations without losing visible quality
  • Cutting storage costs — batch-compress user-uploaded images to save disk and bandwidth

Technical Details

Engine: Canvas API (toBlob/toDataURL). Supported inputs: JPEG, PNG, WebP (browser-dependent). Quality: 0-1 for lossy formats; PNG ignores the quality parameter. Re-encoding strips most EXIF metadata. Output size depends on image content — flat areas compress better than noisy ones. Browser canvas implementations vary; Safari and Chrome may produce slightly different outputs.

How to Use

Enter your input above. The result updates automatically. Use the copy button to copy the result.

Privacy

All processing happens in your browser. Your data is never uploaded to any server.

FAQ

Is my image uploaded to a server?

No. All compression happens locally in your browser using the Canvas API. Your image never leaves your device.

What formats are supported?

You can compress JPEG, PNG, and WebP images. The output format depends on the quality setting you choose.

What quality setting should I use?

For most web images, quality 0.75-0.85 provides a good balance between file size and visual quality. Use 0.9+ for photography where detail matters, and 0.6-0.7 for thumbnails or previews where small size is the priority.

Related Tools