Shlink logo

Shlink

Website

Self-hosted URL shortener with REST API and CLI

5.2k stars 402 forks last commit first released MIT

Actively maintained

Last commit 22 Jun 2026.

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 to Shlink

Kutt logo

Kutt

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

11k
1.5k
Last commit

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

MITActively maintained
Alternative to:
Bitly logo
Bitly
+11
Chhoto URL logo

Chhoto URL

Minimal, fast self-hosted URL shortener written in Rust

920
86
Last commit

Chhoto URL is a lightweight, high-performance self-hosted URL shortener in Rust, focused on simplicity, speed, and minimal features.

MITActively maintained
Alternative to:
Bitly logo
Bitly
+12
YOURLS logo

YOURLS

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

12.1k
2.1k
Last commit

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

MITActively maintained
Alternative to:
Bitly logo
Bitly
+14
GoatCounter logo

GoatCounter

Privacy-friendly web analytics with minimal tracking

5.8k
266
Last commit

Open source web analytics focused on privacy, lightweight tracking, and simple, meaningful reports as an alternative to Google Analytics or Matomo.

Actively maintained
Alternative to:
Google Analytics logo
Google Analytics
+11
MintHCM logo

MintHCM

Open-source Human Capital Management platform for HR workflows

385
78
Last commit

MintHCM is an open-source HCM platform delivering recruitment, onboarding, time & leave management, employee profiles, performance, analytics, and API integrations.

AGPL-3.0Actively maintained
Alternative to:
BambooHR logo
BambooHR
+19
Dub logo

Dub

Open-source link attribution platform for short links and conversions

24.2k
3.2k
Last commit

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

Actively maintained
Alternative to:
Bitly logo
Bitly
+9