Quick Sort Visualizer — Animated, Step-by-Step
Animated quicksort with pivot/partition highlights, step controls, speed, custom input, live counters and pseudocode. Runs in your browser.
Code examples
Ready-to-copy reference implementations. Free to use in your own projects and assignments.
How to use
- 1 Press Play to watch each partition place the pivot and split the array around it.
- 2 Use Step to advance one comparison at a time and follow the partition pointer.
- 3 Type your own numbers into Custom input and press Apply.
- 4 Follow the highlighted pseudocode and the live comparison / swap counters.
Why use this tool
- See how partitioning around a pivot drives the divide-and-conquer recursion.
- Understand why quicksort is usually the fastest comparison sort in practice.
- Metrics reveal the O(n²) worst case when pivots split poorly (e.g. sorted input).
- Runs entirely in your browser. No signup, no uploads.
Frequently asked questions
What is quicksort?
Quicksort picks a pivot, partitions the array so smaller elements go left and larger go right, then recursively sorts each side. This visualizer uses the Lomuto scheme with the last element as pivot.
What is the time complexity of quicksort?
O(n log n) on average, but O(n²) in the worst case when the pivot is consistently the smallest or largest element. Randomized or median-of-three pivots avoid this in practice.
Is quicksort stable?
No. Partition swaps move elements across the array and can reorder equal values. Stable quicksort variants exist but use extra memory.
Why is quicksort so popular?
It sorts in place with good cache behavior and a small constant factor, so it is typically faster than merge or heap sort on real data despite the worst-case bound.
What is Quick Sort Visualizer?
A Quick Sort Visualizer animates the quicksort algorithm: choosing a pivot, partitioning elements around it, and recursively sorting each side. This visualizer uses the Lomuto partition scheme and shows why quicksort averages O(n log n) but can hit O(n²) on poor pivots.
Quick Sort Visualizer is a free algorithm utility by Zerethon Tools. Animated quicksort with pivot/partition highlights, step controls, speed, custom input, live counters and pseudocode. Runs in your browser. Runs entirely in the browser — no signup, no upload.
- Category
- Algorithm
- Pricing
- Free
- Privacy
- Browser-based
- Signup
- Not required
Privacy
Your data never leaves your browser unless explicitly stated. Quick Sort Visualizer runs entirely client-side — no server upload, no logging, no tracking of your input.
Related tools
Bubble Sort Visualizer
Animated bubble sort with step controls, speed, custom input, live comparison/swap counters and pseudocode. Runs entirely in your browser.
Open toolInsertion Sort Visualizer
Animated insertion sort with step controls, speed, custom input, live comparison/write counters and pseudocode. Runs in your browser.
Open toolSelection Sort Visualizer
Animated selection sort with step controls, speed, custom input, live comparison/swap counters and pseudocode. Runs in your browser.
Open toolMerge Sort Visualizer
Animated merge sort with step controls, speed, custom input, live comparison/write counters and pseudocode. Runs in your browser.
Open toolBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.