Home | About | Blog | Resume | Jumping Ball | Jumping Square | URL Shortener

URL Shortener

A C++ URL shortener ported to Python, backed by Redis. Paste any URL below to get a short link.

Shorten a URL

Resolve a code

History (this session)

Short URL Original URL
No links shortened yet.

System Design

URL Shortener System Architecture Shorten flow Client Browser FastAPI Python Backend URL Shortener Python port of C++ base-62 hash Redis cache store POST /api/shorten /s/{code} shorten(url) code store lookup Redirect flow Client Browser FastAPI GET /s/{code} Redis resolve code 301 Redirect to original URL ← sent to client GET /s/{code} lookup(code) original url Codes are 6-character base-62 strings derived from a hash of the original URL