Free · No sign-up · No download免费 · 无需注册 · 无需下载

Image Compressor图片压缩工具

Most "free" compressors quietly upload your photos to somebody else's server. This one cannot — it has no server to upload to. Drop your images in, watch the file sizes fall, and download.大部分「免费」压缩工具会悄悄把你的照片上传到别人的服务器。这个做不到 —— 因为它根本没有服务器。把图片丢进来,看着档案变小,然后下载。

Nothing leaves your device. Your images are decoded and re-encoded by your own browser using the Canvas API. This page makes no network requests of any kind — once it has loaded you can switch your internet off and it still works. 档案不会离开你的设备。图片由你自己的浏览器用 Canvas API 解码与重新编码。本页没有任何网络请求 —— 载入之后就算断网,一样能继续用。

Your images你的图片

Drop them in, then move the quality slider. Everything recompresses as you go.把图片丢进来,再拉动质量滑杆,全部会即时重新压缩。

Drop images here, or click to choose把图片拖到这里,或点击选择
JPG · PNG · WebP · GIF · BMP — up to 30 files at a timeJPG · PNG · WebP · GIF · BMP —— 一次最多 30 个档案
    px
    Total size saved总共省下
    0%
      Downloading several files at once? Your browser may ask permission the first time. Allow it, or use the small ⤓ next to each file instead. 一次下载多个档案时,浏览器第一次可能会跳出询问。选择允许即可,或改用每个档案旁边的小 ⤓ 逐个下载。

      How this is calculated计算方式说明

      Every "free online image compressor" does the same thing: you upload your photo, a server somewhere re-encodes it, and you download the result. That works, but it means a stranger's machine has held a copy of your file. This tool skips that entirely. Your browser already contains a complete image decoder and a complete JPEG, PNG and WebP encoder — the Canvas API — so the whole job is done on your own computer. There is no upload, no queue and no size limit beyond your device's memory.

      What actually happens when you press compress

      Three steps, all local:

      1. Decode. The browser reads your file and turns it into raw pixels — a plain grid of red, green, blue and alpha values.
      2. Resize (optional). If you set a maximum width, those pixels are resampled down to the new dimensions.
      3. Re-encode. The pixel grid is written back out as a new JPEG, WebP or PNG at the quality you chose.

      Because step 1 throws away everything that is not a pixel, the output also loses the file's metadata — EXIF camera settings, timestamps, and crucially the GPS coordinates that phones stamp into photos by default. That is a privacy win most people do not realise they are getting.

      Why the file gets smaller

      JPEG and WebP are lossy. They break the image into small blocks, convert each block into frequency components using a discrete cosine transform, and then throw away the high-frequency detail your eye is worst at noticing. The quality slider controls how aggressively that detail is discarded. They also store colour at half resolution — chroma subsampling — because human vision is far more sensitive to brightness than to colour.

      PNG is lossless: every pixel comes back exactly as it went in. That is why the quality slider disappears when you choose PNG, and why re-saving a photograph as PNG usually makes it bigger, not smaller. PNG is for graphics with flat colour and hard edges, not for photographs.

      Resizing beats quality, almost always

      This is the single most useful thing to know. File size scales with the number of pixels, which scales with the square of the dimensions. Halving the width of an image removes about 75% of its pixels before any compression is applied at all. A 4,000-pixel-wide phone photo displayed in a 600-pixel-wide column on your website is carrying roughly forty times more data than it can possibly show.

      Practical rule: set the maximum width first, and only then reach for the quality slider.

      Which format to pick

      FormatBest forSize & transparency
      JPEGPhotographs, and anything you will email, upload to a government form or send on WhatsAppBaseline size. No transparency.
      WebPWebsite images — smaller than JPEG at the same visual quality25–35% smaller. Keeps transparency.
      PNGLogos, screenshots, diagrams, anything needing a transparent backgroundMuch larger for photos. Keeps transparency.

      WebP is supported by every browser in current use, including Safari since 2020. The one place to still prefer JPEG is when a file is going into somebody else's system — an online application form, a marketplace listing, a print shop — because those often accept JPG and PNG only.

      What quality number should I use?

      For photographs, 75 to 82 is the range where almost nobody can tell the difference from the original, and file size has already dropped by 60–80%. Below about 60 you start seeing "mosquito noise" — faint blocky ringing around text and hard edges. Above 90 you are spending a lot of bytes on detail nobody will see. Screenshots and images containing text are the exception: they hold up badly under JPEG compression, so use PNG or a quality of 90+ for those.

      One thing to be careful about

      Lossy compression is generational. Every time you re-encode an already-compressed JPEG you lose a little more, permanently, and it never comes back. Always compress from the original file, not from a copy you compressed last week. Keep your originals somewhere safe and treat the compressed versions as disposable output.

      Sizes worth aiming for

      • Website images — under 200 KB for a full-width banner, under 100 KB for anything smaller. Page weight is a direct Core Web Vitals input, and images are almost always the heaviest thing on a page.
      • Email attachments — most corporate mail servers reject anything over 10 MB total, and many cap at 25 MB.
      • Online application forms — Malaysian government and bank portals very commonly cap uploads at 200 KB, 300 KB, 1 MB or 2 MB per file, and often reject anything but JPG or PDF. Set a maximum width of 1,000–1,200 px and a quality around 70, then check the resulting size against their limit before you submit.
      • Marketplace listings — Shopee, Lazada and Facebook Marketplace all re-compress your photos anyway, so send them a clean 1,200–1,600 px image rather than a 12 MB original that they will mangle.

      市面上每一个「免费在线图片压缩」做的事情都一样:你上传照片,某处的服务器帮你重新编码,你再下载结果。这能用,但也代表你的档案曾经存在陌生人的机器上。这个工具完全跳过那一步。你的浏览器本身就内建了完整的图片解码器,以及 JPEG、PNG 与 WebP 编码器 —— 也就是 Canvas API —— 所以整件事都在你自己的电脑上完成。没有上传、不用排队,除了你设备的内存以外没有任何大小限制。

      按下压缩时到底发生了什么

      三个步骤,全部在本地:

      1. 解码。浏览器读取你的档案,把它变成原始像素 —— 一整片红、绿、蓝与透明度的数值。
      2. 缩放(可选)。如果你设了最大宽度,这些像素会被重新取样到新的尺寸。
      3. 重新编码。像素资料依你选的质量,重新写成新的 JPEG、WebP 或 PNG。

      因为第一步会丢掉所有「不是像素」的东西,输出档也会一并失去原档的metadata —— 相机参数、拍摄时间,以及最重要的 GPS 坐标(手机预设就会写进照片里)。这是很多人没意识到自己顺便拿到的隐私好处。

      档案为什么会变小

      JPEG 与 WebP 是有损格式。它们把图片切成小方块,用离散余弦变换把每个方块转成频率成分,再把你眼睛最不敏感的高频细节丢掉。质量滑杆控制的就是「丢得多狠」。它们同时还会把颜色以一半的解析度储存 —— 这叫色度次取样 —— 因为人眼对亮度远比对颜色敏感。

      PNG 则是无损的:每一个像素进去什么样,出来就是什么样。所以你选 PNG 时质量滑杆会消失;也因此把照片另存成 PNG 通常会变大而不是变小。PNG 是给色块平整、边缘锐利的图形用的,不是给照片用的。

      缩尺寸几乎永远比降质量有效

      这是最值得记住的一点。档案大小取决于像素数量,而像素数量与尺寸的平方成正比。把宽度砍一半,等于在压缩还没开始之前就先少掉约 75% 的像素。一张 4,000 像素宽的手机照片,放在网站上只占 600 像素宽的栏位,它带着的资料量大约是它能显示出来的四十倍。

      实用原则:先设最大宽度,然后才去动质量滑杆。

      该选哪个格式

      格式适合大小与透明背景
      JPEG照片,以及任何要email、上传政府表格或用 WhatsApp 传的图基准大小。不支持透明。
      WebP网站图片 —— 同样观感质量下比 JPEG 小小 25–35%。保留透明。
      PNG标志、截图、图表,以及任何需要透明背景的图照片会大很多。保留透明。

      目前在用的浏览器全部支持 WebP,Safari 也从 2020 年起支持。唯一仍该优先用 JPEG 的场合,是档案要交给别人的系统 —— 在线申请表、电商平台、印刷店 —— 因为这些地方常常只收 JPG 和 PNG。

      质量该设多少?

      照片的话,75 到 82 是几乎没人分辨得出与原图差异、但档案已经小了 60–80% 的区间。低于大约 60 就会出现「蚊噪」—— 文字与硬边缘周围淡淡的方块状振铃。高于 90 则是把大量容量花在没人看得到的细节上。截图与含文字的图是例外:它们在 JPEG 压缩下表现很差,请改用 PNG 或把质量拉到 90 以上。

      有一件事要特别小心

      有损压缩是会「代代累积」的。每次你把一张已经压过的 JPEG 再压一次,就会再永久损失一点,而且救不回来。请永远从原档压缩,不要拿上星期压过的版本再压一次。原档要好好留着,压出来的版本当成随时可以重做的产物就好。

      值得参考的目标大小

      • 网站图片 —— 全宽 banner 控制在 200 KB 以内,其他更小的图控制在 100 KB 以内。页面重量直接影响 Core Web Vitals,而图片几乎永远是一个页面里最重的东西。
      • Email 附件 —— 多数企业邮件服务器会拒收总容量超过 10 MB 的信,很多上限设在 25 MB。
      • 在线申请表格 —— 马来西亚的政府与银行网站非常常见把每个档案限制在 200 KB、300 KB、1 MB 或 2 MB,而且往往只收 JPG 或 PDF。建议把最大宽度设在 1,000–1,200 px、质量约 70,提交前先对照它们的上限确认档案大小。
      • 电商平台 —— Shopee、Lazada 与 Facebook Marketplace 反正都会再压一次你的图,所以直接给它们一张干净的 1,200–1,600 px 图片,好过丢一张 12 MB 的原档让它们糟蹋。

      Frequently asked questions常见问题

      Are my photos uploaded anywhere?我的照片会被上传到什么地方吗?
      No, and not as a promise — as a technical fact. All the work is done by the Canvas API inside your own browser tab. There is no upload endpoint in this page and no network request is made while you compress. If you want to verify it yourself, open your browser's developer tools, go to the Network tab, and compress a file: you will see zero requests. You can also disconnect from the internet after the page has loaded and the tool will keep working perfectly.不会 —— 这不是承诺,而是技术事实。所有处理都由你自己浏览器分页内的 Canvas API 完成。本页没有任何上传接口,压缩过程中也不会发出任何网络请求。想自己验证的话:打开浏览器的开发者工具,切到 Network 分页,然后压缩一个档案,你会看到零个请求。你也可以在页面载入后断开网络,工具照样完全正常运作。
      Why did my PNG get bigger instead of smaller?为什么我的 PNG 变大了而不是变小?
      Because PNG is lossless — it stores every pixel exactly. If your original was a JPEG photograph, converting it to PNG means the compression that made it small in the first place is thrown away, so the file balloons. PNG only wins on images with large areas of flat colour, like logos, icons, diagrams and screenshots of user interfaces. For a photograph, choose JPEG or WebP.因为 PNG 是无损格式,它会一模一样地保存每一个像素。如果你的原档是 JPEG 照片,转成 PNG 等于把原本让它变小的那套压缩整个丢掉,档案自然暴涨。PNG 只在有大片平整色块的图上占优势,例如标志、图标、图表与软件界面截图。照片请选 JPEG 或 WebP。
      Should I lower the quality or reduce the width?我该降低质量,还是缩小宽度?
      Reduce the width first. File size grows with the square of the dimensions, so halving the width removes roughly three quarters of the data before compression even starts — and unlike a low quality setting, it introduces no visible artefacts at all as long as the image is still bigger than the space it will be displayed in. Once the dimensions are right, drop quality to around 78 and check the result in the preview.先缩宽度。档案大小与尺寸的平方成正比,宽度砍一半,在压缩开始前就先少掉约四分之三的资料 —— 而且不像调低质量,只要图片仍大于它实际显示的尺寸,缩小完全不会产生任何看得见的瑕疵。尺寸调好之后,再把质量降到 78 左右,然后在预览里确认效果。
      Does compressing remove the GPS location from my photos?压缩会移除照片里的 GPS 位置吗?
      Yes. The image is decoded to raw pixels and re-encoded from scratch, so all EXIF metadata — GPS coordinates, camera model, serial number, date and time — is left behind. This matters more than most people think: photos taken on a phone with location services on will otherwise tell anyone who receives them exactly where you live. If you want to strip location without changing the picture, set the format to JPEG, the quality to 95 and the maximum width to 0.会。图片会被解码成原始像素再从头重新编码,所以所有 EXIF metadata —— GPS 坐标、相机型号、机身序号、日期时间 —— 都会被留下不带走。这件事比多数人以为的更重要:手机开着定位拍的照片,会明确告诉每一个收到它的人你住在哪里。如果你只想去掉位置而不想动到画质,把格式设成 JPEG、质量设 95、最大宽度设 0 就好。
      Some of my iPhone photos will not load. Why?我有些 iPhone 照片载入不了,为什么?
      Recent iPhones save photos as HEIC by default, and most browsers cannot decode HEIC. The fix is on the phone: Settings → Camera → Formats → Most Compatible, which switches the camera to JPEG. For photos you have already taken, sharing or exporting them from the Photos app usually converts them to JPG automatically — AirDropping to a Mac or emailing them to yourself both do this.较新的 iPhone 预设以 HEIC 格式储存照片,而大部分浏览器无法解码 HEIC。解法在手机端:设定 → 相机 → 格式 → 最兼容,就会把相机切回 JPEG。至于已经拍好的照片,从「照片」App 分享或导出通常会自动转成 JPG —— 用 AirDrop 传到 Mac,或email给自己,都会自动转档。

      Need a website that brings you customers?想要一个能带来客户的网站?

      We build the demo first. You only pay when you are happy with it.我们先做好 demo 给你看,满意了才付款。

      Get a free demo免费获取 Demo