Everything you need to use and deploy ShortDesk
ShortDesk is a free, open-source URL shortener. No account required.
Visit / or open Platform in the navigation bar.
Enter any valid URL in the input field.
You will get a short URL, a copy button, and a QR code instantly.
Enter any valid URL starting with http:// or https://.
ShortDesk will generate a unique 6-character code using Base62 encoding.
Original: https://example.com/very/long/path/to/page
Shortened: https://your-domain.com/Ab3xK9
You can optionally provide a custom alias instead of the auto-generated code. Aliases must be 3-30 characters, using letters, numbers, hyphens, and underscores.
Custom alias: my-portfolio
Result: https://your-domain.com/my-portfolio
You can protect any link with a password. When someone visits a protected link, they must enter the correct password before being redirected.
Set an expiration time for any link. Available options:
| Option | Duration |
|---|---|
never | Link never expires (default) |
1h | 1 hour from creation |
1d | 1 day from creation |
7d | 7 days from creation |
30d | 30 days from creation |
Expired links show a friendly expiration page instead of redirecting.
In addition to time-based expiration, you can set a maxClicks limit.
Once the link reaches this threshold (e.g. 100 clicks), it immediately deactivates and
returns a 410 Gone status. If configured, a max_clicks_reached webhook event is fired.
Get notified when your link hits a click threshold or expires. ShortDesk
sends a POST request to your webhook URL with this payload:
{
"event": "threshold_reached",
"shortId": "Ab3xK9",
"shortUrl": "https://your-domain.com/Ab3xK9",
"originalUrl": "https://example.com/long-path",
"totalClicks": 100,
"threshold": 100,
"timestamp": "2025-07-27T12:00:00.000Z"
}
For expiry events, "event" will be "link_expired".
Every short link has a dedicated analytics page showing:
Access analytics from the Dashboard by clicking Analytics
next to any link, or visit /analytics/{shortId} directly.
ShortDesk exposes a REST API for programmatic access.
Shorten a URL via the API.
curl -X POST https://your-domain.com/shorten \
-H "Content-Type: application/json" \
-d '{
"originalUrl": "https://example.com/long-path",
"customAlias": "my-link",
"password": "optional-password",
"expiry": "7d",
"maxClicks": 100,
"webhookUrl": "https://your-webhook.com/notify",
"clickThreshold": 100
}'
Get a QR code image for any short link.
GET /api/qr/Ab3xK9?size=200
Returns: PNG image (200x200)
Redirects to the original URL. If the link is password-protected, shows the password entry page.
ShortDesk can be deployed on your own infrastructure.
# Clone the repository
git clone https://github.com/AmiNilay/shortdesk-offical.git
cd shortdesk-offical
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Edit .env with your MongoDB URI and session secret
# Start the server
npm start
| Variable | Required | Description |
|---|---|---|
MONGO_URI | Yes | MongoDB connection string |
SESSION_SECRET | Yes | Secret for session cookies |
PORT | No | Server port (default: 3000) |
NODE_ENV | No | production or development |
GOOGLE_SAFE_BROWSING_KEY | No | Google Safe Browsing API key |
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Set environment variables in Vercel dashboard
# Settings → Environment Variables
| Layer | Technology |
|---|---|
| Runtime | Node.js |
| Framework | Express.js |
| Database | MongoDB + Mongoose |
| Cache | Redis (optional) |
| Template Engine | EJS |
| QR Codes | qrcode library |
| Password Hashing | bcrypt |
| URL Safety | Google Safe Browsing API |
| Deployment | Vercel |
Yes. It is 100% free, open-source software released under the MIT License. No hidden fees, no premium tiers.
No. ShortDesk does not require user accounts. Just paste a URL and shorten it.
Yes, if you self-host. Deploy ShortDesk on your server and configure your domain to point to it.
Indefinitely, unless you set an expiry date. Self-hosted instances can configure their own retention policies.
Yes. See the API Reference section above for endpoint details and examples.
Open an issue on GitHub.