What it does
Sorts runs of pixels into glitchy streaks by brightness, hue, or saturation. The classic pixel sorting look.
The technique has a precise birthplace: Kim Asendorf’s ASDFPixelSort, a Processing script published in 2010 that walked an image line by line and sorted intervals of its pixels. It escaped into net art and album covers almost immediately. The appeal is that it is rule-driven rather than random: a brightness threshold decides which regions detach into streaks and which stay photographic, so the glitch follows the structure of the image instead of ignoring it.
Mechanically, each line of the sort direction is walked for runs of pixels that pass the threshold, in the highlights or in the shadows, and each run is reordered by the chosen key. Because the output is a strict permutation of the run’s own pixels, the streaks are monotonic ramps built from material that was already there: sensor grain survives as speckle inside the ramp, streak ends stay pixel-crisp exactly where the threshold flips, and the image’s overall color histogram is untouched. That permutation property is what separates true pixel sorting from the directional-blur imitations that merely synthesize a smooth gradient.
The craft controls are the sort direction, which works at any angle without softening because the sort travels along exact pixel staircases rather than resampling, the choice of sort key, since brightness, hue, and saturation each produce a different kind of ramp, and how far a run is allowed to grow before it breaks, which sets the look anywhere between short shimmering ticks and full-frame cascades. On video the sort re-runs every frame, and because equal pixels keep their order, static regions hold still instead of boiling while streaks grow and collapse with the motion.
Signature looks
Falling light
Vertical sort, highlights detached into downward ramps. The canonical look: a photograph raining its own brightest pixels.
Horizon smear
Horizontal runs pulled across the frame, landscapes stretched into banded light. Reads as wind made visible.
Hue streams
Runs reordered by hue instead of brightness, so the streaks band into rainbow-ordered currents of the image’s own colors.
Try it on your own footage
This effect runs live in the Modulate editor, free with no signup — or start from the free tool page for a guided setup.
Common questions
What is pixel sorting?
Pixel sorting is a glitch technique that reorders the pixels of an image along lines: runs of pixels selected by a brightness threshold are sorted by brightness, hue, or saturation, turning them into smooth luminous streaks. It is a pure rearrangement, so the image keeps all of its original pixels and grain.
Who invented pixel sorting?
The canonical implementation is Kim Asendorf’s ASDFPixelSort, a Processing script from 2010 that sorted intervals of pixels along rows and columns. Glitch artists adopted and varied it widely, but the interval-plus-sort structure of nearly every pixel sorter since traces back to that script.
Why do pixel-sorted streaks look like ramps of light?
Because each streak literally is a sorted run: its pixels are arranged in order of the sort key, darkest to brightest or around the hue wheel, so the eye reads a smooth gradient. The material is unchanged, only reordered, which is why grain and color noise stay visible inside the ramp instead of being smoothed away.
What is the difference between pixel sorting and motion blur?
Motion blur synthesizes new colors by averaging neighbors, softening everything it touches. Pixel sorting invents nothing: it permutes existing pixels, so streak edges stay sharp, the histogram is untouched, and the texture inside a streak is the image’s own grain. A directional blur behind a threshold can imitate the shape but never the texture.
Can you pixel sort a video?
Yes. The sort re-runs on every frame, and a stable sort keeps static regions perfectly still while streaks grow and collapse along the motion, so footage reads as continuously melting rather than flickering. In Modulate the Pixel Sort effect runs live on images and video in the editor and stacks with datamosh and VHS for a full glitch chain.
Related effects
Datamoshing
Smears moving parts of the image into blocky trails, like a corrupted video that never gets a clean frame.
Pixelate effect
Rebuilds the image as a grid of solid blocks, with a choice of how each block picks its color, grid rotation, and brick-style row stagger.
VHS effect
The full worn videotape package: color bleed, static, dropouts, wobble, and tracking errors.
Blob tracking
Finds regions of the image by color, motion, or edges and draws boxes, markers, and labels around them.