Visualize and audiolize sorting algorithms in real time — with 22 algorithms, 30 visualizations, and full 3D support.
Download latest release » · Report a bug or request a feature
Download the prebuilt JAR and run it with:
java -jar sorting-visualizer.jarRequires Java 25 or later. Download from jdk.java.net/25.
Requirements:
- JDK 25 or later — download here
- Ensure your JAVA_HOME environment variable is set
Clone and build:
git clone https://github.com/66-m/sorting-visualizer.git
cd sorting-visualizer
# Build (using bundled Maven wrapper — recommended)
./mvnw clean package
# or use the convenience script:
./buildRun:
java -jar target/sorting-visualizer.jar
# or:
./runThe
buildandrunhelper scripts are provided for Unix-like systems.
22 algorithms available:
| Quick Sort (Middle Pivot) | Quick Sort (Dual Pivot) | Merge Sort |
| Shell Sort | Selection Sort | Double Selection Sort |
| Insertion Sort | Heap Sort | Gravity Sort |
| Radix Sort (LSD, Base 10) | Gnome Sort | Comb Sort |
| Odd Even Sort | Bubble Sort | Cocktail Shaker Sort |
| Cycle Sort | Counting Sort | American Flag Sort |
| Bucket Sort | Pigeonhole Sort | Tim Sort |
| Bogo Sort |
Algorithm run options:
- Run all algorithms in sequence
- Change the execution order
- Select which algorithms to include
30 visualizations including 3D models:
2D Visualizations (20)
- Bars
- Scatter Plot / Scatter Plot Linked
- Number Plot
- Disparity Graph / Disparity Graph Mirrored
- Horizontal Pyramid
- Color Gradient Graph
- Circle
- Disparity Circle / Disparity Circle Scatter / Disparity Circle Scatter Linked
- Disparity Chords
- Disparity Square Scatter
- Swirl Dots
- Phyllotaxis
- Image Vertical / Image Horizontal
- Hoops
- Morphing Shell
- Mosaic Squares
3D Visualizations (10)
- Sphere
- Sphere Hoops
- Spheric Disparity Lines
- Disparity Sphere Hoops
- Cube
- Cubic Lines
- Pyramid
- Plane
- Disparity Plane
- Array: Configurable size and shuffle type (Random, Reverse, Almost Sorted, Sorted)
- Color gradients: Choose from presets or create your own
- Speed: Adjustable animation speed
- Sound: Toggle mute at any time
- Live measurements: sorted %, comparisons, swaps, array writes, auxiliary writes, estimated real time
- Comparison table: Optionally display a summary after all algorithms have run
- Cancel: Stop execution at any time
Thanks to w0rthy and Musicombo for their amazing videos and for inspiring this project.
Thanks to @micycle1 for his mirror of the processing4 core library, making it available for Maven.