Pixel Sorting Explained

From a 2010 Processing experiment to one of the defining looks of contemporary glitch art — how pixel sorting actually works, and how to use it.

Where pixel sorting comes from

Pixel sorting was popularised around 2010 by German artist Kim Asendorf, who wrote a Processing sketch that sorted image pixels by brightness within a threshold range. The result was striking: parts of the image stayed intact while other parts "spilled" into flowing streaks of color.

Within a few years the technique had spread through generative art communities, then into album art, editorial illustration, music video aesthetics, and — by the mid-2020s — into mainstream Y2K-revival graphic design.

How the algorithm works

The core idea is simple:

  1. Walk through each row (or column) of an image.
  2. Find segments of pixels matching a threshold — for example, "all pixels with brightness between 25% and 85%".
  3. Sort each segment by a chosen key (brightness, hue, saturation, or a single color channel).
  4. Pixels outside the threshold stay in place.

That "stays in place" part is what makes pixel sorting recognisable. The brightest highlights or darkest shadows hold their position while the midtones stream past them, producing the iconic flowing-streak effect.

Sort keys and what they do

Threshold tricks

The threshold range is the artist's main creative control. A few common tactics:

Chunky vs flowing

By default sorts span entire continuous segments — a bright streak can run hundreds of pixels long. STUDIO·ITY's segment max length slider breaks streaks into chunks. Lower values give a more digital, "corrupted" look. Higher (or unlimited) values give the classic Asendorf flow.

Combining with other effects

Pixel sort plays well with other glitch / retro effects in the STUDIO·ITY suite:

Try it

Open Pixel Sort tool →