
Short links, less clutter
shrtnr is a minimal link shortener that makes sharing URLs simple and beautiful. Paste any long URL and get an instant short link. Create an account to unlock custom slugs, click tracking, and a dashboard to manage all your links.Quickstart Guide
Get started in 2 minutes - from signup to your first short link
Custom Slugs
Create branded short links with memorable custom URLs
Analytics & Tracking
Monitor click counts and understand link performance
Dashboard
Manage, edit, and organize all your short links in one place
Why shrtnr?
Long URLs are hard to share, break in messages, and look unprofessional. shrtnr solves this with:- Instant short links - Generate an 8-character short code automatically with nanoid
- Custom slugs - Choose your own memorable URLs (1-20 characters: letters, numbers, _ and -)
- Click tracking - Every click is recorded with IP, user agent, and referrer data
- Link expiration - Set expiry dates from 1-30 days (default: 7 days)
- Redis caching - Lightning-fast redirects powered by Upstash Redis
- Dashboard - View, edit, and delete all your links from one interface
No account required to create links! Sign up only when you want custom slugs, analytics, or a dashboard.
How it works
Paste your URL
Drop any long URL into the input field on the home page. No validation until you submit.
Get a short link
Click “Shorten” and we generate an 8-character code using nanoid. If you’re signed in, you can use a custom slug instead.
Share anywhere
Your short link is automatically copied to your clipboard. Share it in messages, social media, or print materials.
Key features
Automatic code generation
Every link gets a unique 8-character short code generated by the nanoid library:Custom slugs for branded links
Authenticated users can choose their own slugs following a simple pattern:Link expiration
All links expire within 1-30 days (default: 7). The expiration is enforced both in the database and Redis:Redis-powered redirects
Every redirect checks Redis first for sub-millisecond response times:Click tracking
Every click increments a counter and logs detailed analytics:Technology stack
shrtnr is built with modern web technologies:- Next.js 16 - React framework with App Router
- Neon Database - Serverless Postgres for link storage
- Upstash Redis - Edge caching for instant redirects
- NextAuth.js 5 - Authentication with credentials provider
- Tailwind CSS - Utility-first styling
- TypeScript - Type-safe development
API endpoints
POST /api/shorten
Create a new short link with optional custom slug and expiration
GET /api/links
List all links for the authenticated user
PATCH /api/links/[id]
Update a link’s slug or expiration date
DELETE /api/links/[id]
Delete a short link and clear its cache
What’s next?
Create your first link
Follow the quickstart to create an account and shorten your first URL
Learn about features
Explore custom slugs, analytics, and dashboard features
