Url-Shorten-Worker logo

Url-Shorten-Worker

Fast, serverless URL shortener powered by Cloudflare Workers

A lightweight, edge‑deployed URL shortener using Cloudflare Workers and KV, offering custom aliases, password protection, link deletion, and cache control—all under an MIT license.

Url-Shorten-Worker banner

Overview

Overview

Url-Shorten-Worker delivers a minimalist URL shortening service that runs entirely at the edge on Cloudflare Workers. By leveraging Workers KV for persistence, the service provides sub‑second redirects without managing any servers.

Capabilities

The platform supports user‑defined aliases, optional password protection, and per‑link cache‑control settings. A built‑in interface lets you delete individual entries, and the client stores recent URLs in localStorage for quick reuse. All data resides in a KV namespace bound to the worker, ensuring durability across deployments.

Deployment

To launch your own instance, create a KV namespace in the Cloudflare dashboard, bind it to the worker under the variable name LINKS, copy the provided index.js into a new Worker, and click Save and Deploy. The demo site expires links after 24 hours, so for production use you should host your own version. The project is released under the MIT license and is ready for immediate customization.

Highlights

Custom short link aliases
Password‑protected redirects
Edge‑cached storage via Workers KV
One‑click deletion of individual links

Pros

  • Zero server maintenance – runs on Cloudflare edge
  • Sub‑second redirect latency
  • Simple deployment with a few dashboard steps
  • MIT license permits unrestricted use

Considerations

  • Tied to Cloudflare Workers ecosystem
  • KV storage offers eventual consistency
  • Demo links auto‑expire after 24 hours
  • No built‑in analytics or reporting

Managed products teams compare with

When teams consider Url-Shorten-Worker, these hosted platforms usually appear on the same shortlist.

Bitly logo

Bitly

URL shortening and link management service for creating concise, trackable links with analytics

Cutt.ly logo

Cutt.ly

URL shortener with branded links, QR codes, and analytics

Rebrandly logo

Rebrandly

Branded URL shortener and link management

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Developers needing quick, self‑hosted short URLs
  • Teams that want password‑protected links
  • Projects requiring edge‑level performance
  • Users looking for a free, open‑source solution

Not ideal when

  • High‑volume commercial services needing SLA guarantees
  • Organizations without a Cloudflare account
  • Use cases demanding detailed click analytics
  • Scenarios requiring instant consistency across regions

How teams use it

Temporary sharing in chat

Generate short links that automatically expire after 24 hours, keeping conversations tidy.

Branded marketing URLs

Create custom aliases that match campaign naming conventions for easy tracking.

Secure document distribution

Protect sensitive files with password‑protected short links, limiting access to authorized users.

Cache‑optimized landing pages

Set cache‑control headers per link to serve static content quickly from the edge.

Tech snapshot

JavaScript100%

Tags

tinyurlcloudflare-workersshortenershorten-urlsserverlessbitlyapiurl-shortenerjavascriptcloudflare-worker

Frequently asked questions

How do I deploy the shortener?

Create a Workers KV namespace, bind it as `LINKS` in the worker settings, copy `index.js` into a new Cloudflare Worker, then click Save and Deploy.

Where are the shortened URLs stored?

All mappings are persisted in the bound Workers KV namespace.

Can I use my own domain?

Yes, configure a custom domain in Cloudflare and point it to the deployed worker.

Is there a limit on the number of links?

Limits depend on your Cloudflare KV plan; the free tier provides generous quotas for typical use.

How do I delete a short link?

The web interface includes a delete button for each entry, which removes the key from KV.

Project at a glance

Active
Stars
1,705
Watchers
1,705
Forks
1,305
LicenseMIT
Repo age5 years old
Last commit2 months ago
Primary languageJavaScript

Last synced yesterday