๐Ÿ”€Sorting Algorithm Visualizer

Pick an algorithm and press play โ€” watch bars compare, swap, and sort in real time with speed and size you control.

0 comparisons 0 swaps Step 0 / 0 Ready

Sorting Algorithm Visualizer Online โ€” Free & Interactive

Want to actually see how sorting algorithms work? Our free Sorting Algorithm Visualizer animates them step by step the moment you press play. As a clear, interactive sorting algorithm visualizer, it shows a set of bars being compared, swapped, and ordered in real timeโ€”so abstract pseudocode turns into something you can watch and understand.

Compare the classics side by side: bubble, selection, insertion, merge, quick, and heap sort, each with comparisons and swaps highlighted as they happen. Adjust the array size and animation speed, generate a fresh random array, and step through or play the whole run. Each algorithm comes with its best, average, and worst-case time complexity, so you see not just how it sorts but how efficiently. Whether you're a student, a teacher, or prepping for interviews, it makes algorithms click.

Simply pick an algorithm and press play. No sign-up, no downloads, no limitsโ€”just clear visual learning whenever you need it.

Algorithm Complexity Reference

Bubble Sort

BestO(n)
AverageO(nยฒ)
WorstO(nยฒ)
SpaceO(1)
Stable

Selection Sort

BestO(nยฒ)
AverageO(nยฒ)
WorstO(nยฒ)
SpaceO(1)
Unstable

Insertion Sort

BestO(n)
AverageO(nยฒ)
WorstO(nยฒ)
SpaceO(1)
Stable

Merge Sort

BestO(n log n)
AverageO(n log n)
WorstO(n log n)
SpaceO(n)
Stable

Quick Sort

BestO(n log n)
AverageO(n log n)
WorstO(nยฒ)
SpaceO(log n)
Unstable

Heap Sort

BestO(n log n)
AverageO(n log n)
WorstO(n log n)
SpaceO(1)
Unstable