Oxipng

github.com/shssoichiro/oxipng Image Tools Open-source projectOpen source

Oxipng optimizes PNG and APNG files with lossless compression, and offers both a command-line interface and a library.

github.com/shssoichiro/oxipng
Oxipng homepage screenshot

About Oxipng

Oxipng is an open-source, multithreaded optimizer for PNG and APNG files that uses lossless compression. It is written in Rust and can be used as a command-line tool or as a library in other Rust programs. The project lists Linux, macOS, and Windows as supported platforms. Installation options include Windows releases on GitHub, package managers, Cargo, a Docker image, and building from source.

The command-line tool offers optimization levels from 0 to 6 or max, where lower levels run faster and higher levels usually compress more. It can also strip metadata and apply an alpha option that changes the colors of fully transparent pixels to improve compression. APNG support is limited: alpha optimization, refiltering, and recompression of all frames are supported, but other transformations are disabled.

Key features

  • Lossless PNG and APNG compression optimization
  • Command-line optimization levels from 0 to 6, or max
  • Metadata stripping in safe or all modes, or by chunk list
  • Alpha option that alters fully transparent pixel colors to aid compression
  • Rust library for use inside other Rust programs
  • Pre-commit hook configuration for Git workflows
Best for: Developers who want to batch-reduce PNG file sizes from the command line, in Git hooks, or within Rust projects.
Good for
  • Open source, with the project describing itself as fast and highly effective
  • Available through Windows releases, package managers, Cargo, and Docker
  • Usable both as a command-line tool and as a Rust library
Watch out for
  • APNG support is limited, and several transformations are disabled for animated files
  • The alpha option is technically lossy and may be unsuitable for some applications
  • Higher optimization levels are usually but not guaranteed to produce smaller output

Oxipng at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Platforms
Linux, macOS, Windows
Open source
Yes · Source code
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

Oxipng alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Image Tools

Well-known listings from the same topic.

All 174

Oxipng FAQ

Is the alpha option lossless?
No. The project notes that the --alpha option is technically a lossy transformation and may be unsuitable for some specific applications, although it is generally recommended.
How can Oxipng be run with Docker?
A Docker image is available at ghcr.io/oxipng/oxipng for linux/amd64 and linux/arm64. For example: docker run --rm -v $(pwd):/work ghcr.io/oxipng/oxipng -o 4 /work/file.png
Does a higher optimization level always give a smaller file?
Not always. The project states that higher levels are almost always better or equal, but it is possible in rare cases that a lower level gives a marginally smaller output. Zopfli compression (-z) is also not guaranteed to beat default compression.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing