Binary Search Visualizer
Learn Search Algorithms
Visualize how binary search efficiently finds elements in a sorted array by repeatedly dividing the search interval in half.
Visualization
Color Legend
Default
Left (L)
Right (R)
Middle (M)
Found
Excluded
Complexity
Time Complexity
O(log n)
Space Complexity
O(1)
Best Case
O(1) - Element at middle
Worst Case
O(log n) - Element not found
How It Works
- Start with sorted array
- Find middle element
- Compare with target
- If equal, found!
- If less, search right half
- If greater, search left half
- Repeat until found or exhausted
You Might Also Like
Explore more tools in this category
Email Extractor
Extract and validate email addresses from any text
Lottery Number Generator
Generate random lottery numbers for Powerball, Mega Millions, and more
CURL Command Generator
Build CURL commands visually with all options
Speed Test
Test your internet download and upload speed
Random Team Generator
Split people into random teams
Random Card Generator
Draw random playing cards from deck
Random Number Generator
Generate random numbers
Random Letter Generator
Generate random letters
Random Month Generator
Generate random months