Shlink

Shlink

Self-hosted URL shortener with REST API and CLI

4.7kstars
373forks
Last commit: 15d ago
Repo age: 10y old
Shlink screenshot

Shlink is a PHP-based, self-hosted URL shortener that lets you create and serve short links under your own domains. It provides API-first management and a CLI, while tracking anonymized visit statistics for each short URL.

Key Features

  • Create short URLs with auto-generated codes or custom slugs
  • Serve short links under one or multiple custom domains
  • REST API with API key authentication for full remote management and integrations
  • Command-line interface for administration tasks (including API key management)
  • Visit tracking with anonymized analytics and optional geolocation data
  • Deployable via prebuilt distribution packages or container images

Use Cases

  • Run a private branded link shortener for teams, products, or marketing campaigns
  • Integrate link creation and management into internal tools via a REST API
  • Track engagement on shared links while keeping link ownership under your control

Limitations and Considerations

  • Requires a supported database (MySQL/MariaDB/PostgreSQL/SQL Server/SQLite) and appropriate PHP extensions
  • Some administrative operations (like API key management) are available only via the CLI

Shlink is a strong choice when you want a reliable, API-driven URL shortener that you can operate under your own domains. Its combination of CLI tooling, integration-friendly API, and visit analytics makes it suitable for both personal use and organizational deployments.

Categories:

Tags:

Tech Stack:

Share:

Similar Services

Dub

Dub

Open-source link attribution platform for short links and conversions

23.1k
2.9k
Last commit: 20h ago

Dub is an open-source link attribution platform for branded short links, real-time analytics, conversion tracking, webhooks, and affiliate/referral programs.

Alternative to:
Bitly
Bitly
+9
YOURLS

YOURLS

Self-hosted URL shortener with analytics, API, and plugins

11.9k
2.1k
Last commit: 2d ago

YOURLS is a self-hosted PHP URL shortener with custom short links, a developer API, detailed click analytics, and an extensible plugin architecture.

Alternative to:
Bitly
Bitly
+14
Kutt

Kutt

Modern URL shortener with custom domains, stats, and an API

10.6k
1.4k
Last commit: 2mo ago

Open-source, self-hostable URL shortener with custom domains, link management, private analytics, and a REST API.

Alternative to:
Bitly
Bitly
+11
Sink

Sink

Link shortener with analytics running on Cloudflare

6.4k
4.3k
Last commit: 2d ago

Sink is a fast, secure link shortener with built-in analytics, custom slugs, link expiration, and serverless deployment on Cloudflare Workers or Pages.

Alternative to:
Bitly
Bitly
+11
MicroBin

MicroBin

Secure pastebin for text and file sharing with URL shortening

4.1k
265
Last commit: 2d ago

MicroBin is a lightweight, secure pastebin for sharing text, files, and short URLs with optional encryption, expiration controls, and raw file serving.

Alternative to:
Pastebin
Pastebin
+17
LinkStack

LinkStack

Self-hosted platform for shareable profile pages with multiple links

3.5k
379
Last commit: 8d ago

LinkStack is an open-source, self-hosted Linktree alternative for creating customizable profile pages that aggregate all your important links in one place.

Alternative to:
Later Linkin.bio
Later Linkin.bio
+2