Compress JPG and PNG Images Online Without Uploading Files
Summary:Reduce JPG and PNG file sizes in your browser. Learn how quality settings, output formats, and compression ratios affect your images.

Slow web pages, upload size limits, and blurry images in messaging apps often have one thing in common: the original image is too large. The image compressor from Xian's Tools processes images directly in your browser, without uploading them to a server. Use it for screenshots, ID photos, product images, and other files you want to keep on your device.

Why no upload is needed

The tool runs a WebAssembly version of ImageMagick inside your browser. It reads and processes the selected image in local memory, then creates a download for the result. This means:

You do not have to wait for an image upload, even on a slow connection.

Closing the page ends the session and releases its processing data.

Processing speed depends on your device; large images can take longer.

How to compress an image

  1. Open Image Compression, click Select File, or drag an image into the drop area.
  2. The tool automatically processes the image once using the default quality of 75 and the original format.
  3. Compare the original size, the size shown under After, and the Ratio.
  4. To adjust the result, change Quality or Output Format, then click ReConvert.
  5. Click Download to save the result.

What the quality slider changes

The same slider behaves differently depending on the format:

  • JPG to JPG, including Original: sets JPEG quality. Lower values usually reduce file size but can introduce visible blocks and rough edges.
  • PNG to PNG, including Original: reduces the color palette to approximately 64–256 colors and removes metadata. This can work well for icons, screenshots, and illustrations, but may cause banding in photographs.

作为起点,照片用 JPG,截图和图标保留 PNG。

建议设置

  • 网站和产品照片:先试 JPG 质量 60–80,然后检查细节。节省幅度取决于源图像。
  • 受上传限制的图片:从 75 开始,如有需要逐渐降到 50。
  • 截图和文字较多的图片:保留 PNG,从 75 或更高开始;转换后检查文字和颜色渐变。
  • 透明 Logo:保留 PNG,因为 JPG 会把透明区域变成白色背景。

如何解读比例

显示的比例是 compressed size / original size。结果为 35% 表示新文件是原始大小的 35%。接近或高于 100% 的值可能意味着源文件已被高效压缩,或所选输出格式需要更多空间。尝试其他格式或质量设置。

常见问题

图像尺寸会改变吗?

No. This tool changes quality and colors while preserving width and height. To reduce pixel dimensions, use Resize in Image Tools. Reducing dimensions can save more space than lowering quality alone.

Why is the compressed file larger?

This can happen when converting an already compressed JPG to PNG or processing an image that already uses a low quality setting. Keep the original format and adjust quality as needed.

Is EXIF metadata preserved?

JPG-to-JPG compression generally preserves existing metadata, while PNG output removes metadata. Keep this in mind if your photos contain capture dates or device information.

Can I compress a batch of images?

The current tool processes one image at a time.

Related tools

Questions
Compress JPG and PNG Images Online Without Uploading Files
Reduce JPG and PNG file sizes in your browser. Learn how quality settings, output formats, and compression ratios affect your images.
Convert PNG to JPG and JPG to PNG Online
Convert PNG, JPG, and BMP images in your browser without uploading files. Learn how conversion affects transparency, file size, and image quality.
Crop Images Online: Aspect Ratios, Rotation, and WebP Export
Crop photos to 1:1, 16:9, and other aspect ratios. Rotate, flip, and lock your selection, then export PNG, JPG, or WebP directly in your browser.
Resize Images, View Image Information, and Create ICO Icons Online
Resize images, adjust output quality, inspect format and color space, and convert PNG or JPG to ICO icons with browser-based Image Tools.
Convert MOV to MP4, MKV to MP4, and MP4 to WebM Online
Convert videos between MP4, MKV, AVI, MOV, FLV, WebM, and M4V in your browser. Compare formats and learn what changes during conversion.
Trim and Crop Videos Online, Then Export MP4
Keep a selected video segment, remove black borders, or crop a recording to one area. Trim and crop locally in your browser and download an MP4.
Extract Audio from Video Online: Convert MP4 to MP3
Extract sound from MP4, MOV, or MKV videos and export MP3, WAV, FLAC, or M4A. Process recordings locally in your browser without uploading files.
Convert WAV, FLAC, and M4A to MP3 Online
Convert audio between MP3, WAV, FLAC, M4A, OGG, WMA, and AC3 in your browser. Compare formats and understand the tradeoffs in file size and quality.
Trim Audio Online: Cut MP3 Clips with a Waveform Preview
Select a time range on an audio waveform, listen to the preview, and export MP3. Make short clips or remove unwanted sections from recordings locally.
Generate and Read QR Codes Online from Text, Links, and Images
Create a downloadable QR code from text or a URL, or decode a QR image in your browser. Learn how to make codes easier to scan and inspect their links.
AES Encryption and Decryption Online: CBC, ECB, Keys, and IVs
Use AES-128, AES-192, or AES-256 with CBC or ECB in your browser. Check UTF-8 key lengths, IV requirements, and hex or Base64 ciphertext encoding.
Base64 and URL Encoding Online: Differences and Common Uses
Encode and decode UTF-8 text with Base64 or URL percent-encoding in your browser. Learn which to use and how to troubleshoot malformed URL escapes.
Random String Generator: Alphanumeric Test Data and Temporary IDs
Generate 1–10,000 alphanumeric characters with a letter first. Create test data and temporary identifiers, and learn why this tool is unsuitable for secrets.
Free Online Tools for Images, Video, Audio, and Encoding
Explore Xian's Tools for compression, conversion, trimming, QR codes, AES, and hashing. Learn how files are processed locally in your browser without uploads.
Compress Videos Online: MP4 Compression, Bitrate, and File Size
Compress MP4, MOV, and MKV videos locally in your browser. Learn how the quality slider changes bitrate and how to interpret the estimated output size.
Compress Audio Online: Reduce MP3 Bitrate and Recording File Size
Reduce audio file sizes locally in your browser. Learn how bitrate affects size and how to choose compression settings for speech, podcasts, and music.
Calculate MD5, SHA, and HMAC Online: Uses and Differences
Calculate MD5, SHA1, SHA256, SHA512, and HMAC for text in your browser. Understand digest lengths, API signatures, and why hashing is not encryption.