Url-Shorten-Worker is a free, open-source (MIT) URL shortener and pastebin that runs entirely on Cloudflare Workers + Workers KV. The whole backend is a single index.js file — deployment takes about 5 minutes: create a KV namespace, paste the code, bind a domain. On the Workers free tier it costs $0/month to run.

Features: custom slugs, per-link expiry, built-in CAPTCHA on link creation, pastebin mode storing up to 10 MiB texts with a ?raw=1 raw view, optional Google Safe Browsing screening, and docs in English and Chinese. No database server to manage — it scales automatically with traffic.

Repo: https://github.com/xyTom/Url-Shorten-Worker

Live demo of the code: https://lnks.eu.org