SIMULATORS · BFOTKIT

Sorting Algorithm Visualizer | BFOTKit

Shuffle a bar chart and watch bubble, insertion, or selection sort work through comparisons and swaps, step by step.

The drawing runs entirely in this browser tab. Nothing is uploaded.

GUIDE

Comparing the three classics

Bubble sort talks a lot

It compares every neighbor pair, over and over. Long bars take long walks to the right — the most comparisons per element.

Insertion sort builds a hand

It grows a sorted prefix one card at a time, shifting everything bigger out of the way. Nearly-sorted inputs finish almost instantly.

Selection sort is steady, not fast

It scans for the minimum and does one swap per pass. Few swaps, many comparisons — a good teaching contrast.

HELP / FAQ

Sorting questions

Which algorithm is best?

For tiny arrays all three are fine. Generally insertion beats bubble; both are teaching tools rather than production sorts.

What do the highlighted bars mean?

Yellow bars are the pair being compared; red flashes mark a swap happening.

Can I slow it down?

Yes — the speed slider stretches every step out.

Does it run locally?

Yes — everything runs in this browser tab.

EXPLORE BY CATEGORY · BFOTKIT

More tools like this

Pick a category to see every tool in it — then open one and discover related tools.

Browse all tools