AI summary by TwinMind
Will YouTube Ever Run Out Of Video IDs?
Tom Scott
5m 10s
YouTube Video ID System Structure
- Every YouTube video has unique 11-character ID in URL
- Uses base 64 encoding system instead of base 10 or base 16
- Characters include: 0-9, A-Z, a-z, hyphen, underscore (64 total)
- Standard base 64 uses slash and plus, but YouTube uses hyphen/underscore for URL compatibility
- IDs are random numbers, not sequential counters
Number Base Systems Comparison
- Humans count in base 10 (0-9)
- Computers use base 2 (binary) - difficult for humans to read, gets too long
- Base 16 (hexadecimal) commonly used: 0-9, A-F - efficient but not easily human-readable
- Base 64: 2^6, easy for computers, relatively human-readable
- Base 65,536 exists (Sam Hughes creation) - includes characters from every language, described as "ridiculous and unnecessary"
Why YouTube Uses Random IDs vs Sequential Counting
- Sequential counting problems:
- Requires synchronization between servers handling uploads
- Need to assign number blocks to each server
- Extensive tracking required to prevent duplicates
- Security vulnerabilities of incremental counters:
- Easy enumeration - users can guess other video IDs
- Breaks unlisted video privacy (videos not publicly listed but shareable via link)
- Reveals business metrics to competitors (exact customer count)
- Enables bulk data downloads
- Exposes personal details (Florida website example mentioned)
- YouTube solution: Generate random number, check if taken, use if available
YouTube Upload Statistics
- 400 hours of video uploaded every minute (last released stats)
- Millions of videos total on platform
Base 64 Capacity Calculations
- 1 character: 64 possible IDs
- 2 characters: 64 × 64 = 4,096 IDs
- 3 characters: 64³ = 262,144 (quarter million+)
- 4 characters: 16+ million (enough for London population twice)
- 7 characters: 4 quadrillion
- 11 characters (YouTube's system): 73,786,976,294,838,206,464 possible videos
- Enough for every human on Earth to upload one video per minute for ~18,000 years
Dictionary Filtering
- YouTube likely filters out actual words from IDs
- Particularly blocks inappropriate/rude words
- Filtered words represent tiny minority of total possible combinations
- Negligible impact on overall capacity
System Scalability
- Technically possible to run out of URLs
- Practically impossible given current usage
- Simple solution if needed: add one more character to ID length
- YouTube "planned ahead" with 11-character system
