Documentation · Assets
Back to toolImage Quantizer
Reduce the color palette of JPG, PNG, and WebP photos and artwork in the browser. The tool uses Squoosh’s ImageQuant WebAssembly codec to select up to N colors, with optional dithering to soften banding.
All processing happens locally, in your browser. The image never leaves your device.
How to use
- Add a file (drag, pick) or paste an image from the clipboard.
- Choose how many colors to keep (2 to 256; default 16).
- Turn dithering on or off.
- Download or copy the resulting PNG.
Formats
| Format | Input | Output |
|---|---|---|
| JPEG | yes | PNG |
| PNG | yes | PNG |
| WebP | yes | PNG |
Export is always PNG, regardless of the input format — the result uses the reduced palette at full resolution.
Palette (ImageQuant)
- ImageQuant analyzes the image and optimizes a palette with up to the requested number of colors.
- Transparency (alpha) is preserved; nearly transparent pixels are skipped in the palette statistics shown by the tool.
- The live preview is quantized from a reduced-resolution copy for responsiveness. Download and copy run ImageQuant again at full resolution.
Dithering
With dithering on (default), each pixel’s quantization error is spread to its neighbors (Floyd–Steinberg). That reduces banding and posterization when the palette is small.
With dithering off, every pixel maps to the nearest palette color — a flatter look, closer to classic pixel art.
What you see in the result
- Color count before → after (opaque pixels only).
- Swatches for the generated palette.
- A responsive preview using the same settings as download/copy.
Technology used
- Squoosh’s ImageQuant codec, compiled to WebAssembly, performs palette reduction and dithering.
- A Web Worker with
OffscreenCanvaskeeps WASM processing and PNG generation off the main thread.
Technical details
- Two-step pipeline: the image is decoded once (ingest) and re-quantized whenever options change (transform), with stale-while-revalidate preview.
- EXIF metadata and color profiles are not preserved in the PNG export.
- Multi-file / ZIP export is out of scope for this version.