Skip to content
LovTools
EN

Sorting Algorithm Visualizer

Watch and hear eight sorting algorithms and compare how many steps they need.

Processed locally on your device — nothing is uploaded.

About the Sorting Algorithm Visualizer

Seeing an algorithm work is the fastest way to understand it. Pick one of eight classic sorting algorithms and watch it rearrange up to 400 bars, with every comparison flashed in pink — and optionally hear it, each bar played as a tone so faster algorithms literally sound different.

Start from random, nearly sorted, reversed or few-unique data to see best and worst cases, and read the big-O complexity. A table runs every algorithm on exactly the same data and counts comparisons and writes, so you can see why quicksort and merge sort win on large inputs.

How to use the Sorting Algorithm Visualizer

  1. Choose an algorithm and the starting order.
  2. Press Sort and adjust the speed.
  3. Compare all algorithms in the table.

Features

  • 8 algorithms
  • Sound
  • Four kinds of input
  • Comparison and write counts
  • Big-O summary

Supported formats

  • Interactive

Frequently asked questions

Why is insertion sort fast on nearly sorted data?

It only moves elements that are out of place, so nearly sorted input takes close to n steps instead of n².

Is my text sent anywhere?

No. Everything runs in your browser, so nothing you paste is uploaded or stored.

Added · Last reviewed · Maintained by Sohail Khax · How we test tools