pngtoolskit.org
PNG and image utilities, in the browser
Say hi →

Pixel Sort

rows or columns · brightness / hue / saturation key · threshold band

Pixel sorting takes a run of pixels and reorders it. Done to the whole row you get meaningless gradient stripes; the technique only works because of the threshold — only pixels whose brightness falls inside a band get sorted, so runs break wherever the image goes very light or very dark, and the structure of the picture survives as the boundaries between sorted streaks.

Drop images here

PNG, JPG, WebP — multiple files allowed

    no files
    Ready.

    The band is the whole effect

    Brightness decides which pixels are eligible, always — even when you sort by hue. A wide band, say 20 to 240, makes almost everything eligible, so runs stretch across the entire image and the result is close to abstract. A narrow band, 100 to 150, only catches midtones, so the sorted streaks appear in the middle-lit parts of the picture while highlights and shadows stay sharp. That contrast between destroyed and intact regions is what makes the effect legible.

    Minimum run length filters out short runs. With it at 2, every stray pair of eligible pixels gets sorted and the image just looks noisy. At 20 or more only substantial stretches are affected, which gives clean long streaks against untouched detail. It is the second dial to reach for after the band.

    Sort key and direction

    Brightness is the standard and produces smooth dark-to-light ramps within each run. Hue sorting is more chaotic because hue wraps around at 360° — a run containing both reds ends up split, which creates hard colour jumps that some people prefer. Saturation sorting pushes the greys to one end and the vivid colours to the other, which works well on images with a strong single colour.

    Rows give horizontal streaks and read as motion or scanning damage; columns read as melting or dripping, which is why they suit portraits and architecture. Running the tool twice — once by rows, once by columns — gives a woven result that looks quite different from either.

    FAQ

    Nothing changed.

    No run met the minimum length. Widen the band, or lower the minimum. On a very dark or very bright image the default 60–200 band may contain almost no pixels at all — check the histogram to see where the tones actually sit.

    Why did it destroy the whole image?

    The band is too wide, so every pixel is eligible and each row becomes one long sorted gradient. Narrow it toward the midtones.

    Does it work on transparent images?

    Yes — alpha travels with each pixel during the sort, so transparency is reordered along with the colour. On a cut-out that produces streaks that keep the shape's own transparency, which is often a more interesting result than on a full rectangle.

    What pairs well with it?

    Chromatic aberration and Glitch are the usual companions. Sort first, then displace, then fringe — in that order the artefacts stack instead of cancelling.