FertiJourney Dev Tools 🏠← All tools

Binary Search Visualizer

Step-by-step binary search on a sorted array — watch low / mid / high pointers move, comparisons highlighted, with a running step log.

Array size (8–30)
Custom array (sorted)
Target value
Speed (ms / step)
Search range Mid Compare Eliminated Found
Status:
Step
0 / 0
Comparisons
0
Current range
Searching…
Set the array size (8–30) or enter a custom sorted array of integers, put in the target value, then press Next step to advance one step at a time or Auto play to run through. Each iteration computes mid = ⌊(low + high) / 2⌋, compares arr[mid] with the target and halves the search range. Blue bars are the active search range, the orange bar is mid, the yellow bar is the current comparison, grey bars are eliminated and green marks the found element. The step log records every decision — a clear way to see why binary search runs in O(log n).