Heap & Priority Queue Visualizer
Step-by-step visualization of a binary heap (min or max) with synchronized tree + array views and live index math (parent=(i-1)/2, children=2i+1/2i+2). Insert with sift-up, extract with sift-down, build-heap (heapify) in O(n), peek / size / height, priority-queue operations (change-priority, decrease-key, increase-key), one-click heapsort demo, build-heap vs n-inserts comparison, step / reverse / play / speed controls, and shareable state URLs. 100% client-side.
Step-by-step visualization of a binary heap (min or max) with synchronized tree + array views and live index math (parent=(i-1)/2, children=2i+1/2i+2). Insert with sift-up, extract with sift-down, build-heap (heapify) in O(n), peek / size / height, priority-queue operations (change-priority, decrease-key, increase-key), one-click heapsort demo, build-heap vs n-inserts comparison, step / reverse / play / speed controls, and shareable state URLs. 100% client-side. Everything runs locally in your browser — your data never leaves your device.
How to use
- Enter your input in the tool above.
- Adjust any options to your preference.
- Use the Copy or Download buttons to save the result.
- Everything happens locally — your data never leaves your browser.