ShiftLink
KV EDGE
Cloudflare KV Backend
Back to Hub →
<15ms Global Edge Redirects

Minimal Edge KV URL Shortener

Lightweight, privacy-first link shortener backed by your Cloudflare Worker and Key-Value edge storage. Instant redirects, custom vanity back-halves, and intelligent 20-day inactivity auto-deletion.

Paste long web link or photo gallery URL
Auto-generated if empty
swifttools.pages.dev/s/
TTL: 1,728,000s
Live Short URL Preview (Where links are created) https://swifttools.pages.dev/s/random-slug
Current Domain (KV Edge)
Smart Inactivity Policy: 20 Days Rolling TTL Active
Every time a visitor clicks this short link, the KV expiration resets for another 20 days. If the link receives 0 clicks for 20 continuous days, Cloudflare KV automatically deletes the key to keep your storage neat, fast, and free.
Stored in KV Edge Successfully
Auto-delete after 20 days inactive
Cloudflare KV Storage Payload Preview
Stored at edge


          
          
Paste into msstore-worker (Safe: Does NOT touch MS Store logic)
// 1. In Cloudflare Dashboard -> msstore-worker -> Settings -> Variables -> KV Bindings:
//    Bind your link KV as: env.LINK_KV

// 2. Add this block to your worker's fetch(request, env) handler:
if (request.method === "POST" && url.pathname === "/api/shorten") {
  const { url: dest, slug, ttl } = await request.json();
  const kvOpts = ttl ? { expirationTtl: Number(ttl) } : {};
  await env.LINK_KV.put(`url:${slug}`, JSON.stringify({
    destination: dest, createdAt: Date.now(), lastAccessed: Date.now(), clicks: 0
  }), kvOpts);
  return new Response(JSON.stringify({ success: true, slug, shortUrl: `${url.origin}/s/${slug}` }), {
    headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*" }
  });
}

if (request.method === "GET" && url.pathname.startsWith("/s/")) {
  const slug = url.pathname.replace("/s/", "").trim();
  const raw = await env.LINK_KV.get(`url:${slug}`);
  if (!raw) return new Response("Link expired or not found", { status: 404 });
  const data = JSON.parse(raw);
  data.clicks = (data.clicks || 0) + 1;
  data.lastAccessed = Date.now();
  await env.LINK_KV.put(`url:${slug}`, JSON.stringify(data), { expirationTtl: 1728000 }); // renews 20-day TTL!
  return Response.redirect(data.destination, 302);
}

Recent Short Links

0 links
Short Link Destination URL Expiration Policy Clicks Created Actions
🔗
No short links created yet
Paste any web URL above to generate your first 20-day KV edge short link.

How ShiftLink Works in 3 Simple Steps

1

Paste Destination URL

Input any long link, document URL, portfolio gallery, or photo website asset into the destination box.

2

Choose Inactivity Policy

Keep the default 20-Day Inactive Cleanup to automatically purge dead links, or choose permanent or disposable modes.

3

Instant Global Edge Routing

Your short link is stored in Cloudflare KV edge servers worldwide, serving <15ms 301/302 redirects with zero cold starts.

Engineered for Performance & Zero Database Overhead

<15ms Latency at 300+ Cities

Traditional SQL shorteners query distant centralized databases. Cloudflare Workers KV reads key-value pairs directly from local edge memory closest to your visitor.

Rolling 20-Day TTL Cleanup

Never pay for abandoned URLs. If a link receives zero visits over 20 consecutive days, KV automatically expires it. Active links that receive visits keep renewing their 20-day lease automatically.

Photo Site KV Safe Coexistence

Share your existing photo website KV database with 100% safety. Links are stored under isolated key prefixes (url:slug), ensuring images and short links never conflict.

How ShiftLink KV Compares to Legacy Shorteners

Feature Legacy Shorteners (Bitly / TinyURL) ShiftLink KV Edge
Redirect Latency 120ms – 350ms (Centralized server query) <15ms (Cached at global edge)
Unused Link Auto-Purge None (clutters database forever or charges fees) Automatic 20-Day Inactive Rolling TTL
Privacy & Tracking Third-party ad trackers, cookies, redirects Zero cookies, zero ad trackers, local-first
Database Architecture Heavy relational SQL / NoSQL database cluster O(1) Edge Key-Value Storage
QR Code Generation Watermarked / Paywalled HD export 100% Free Instant HD PNG & SVG

Frequently Asked Questions

When you select Delete if unused for 20 Days, ShiftLink sets a native Time-To-Live (TTL) of 1,728,000 seconds (20 days) in your Key-Value store. As long as users click or visit your link, the timer continues renewing. If a link goes completely unused for 20 days straight, Cloudflare KV automatically deletes it, ensuring dead links never accumulate or consume quota.
Yes! This is a rolling TTL policy. Every single visit updates the link's lastAccessed timestamp and pushes the KV expiration out by another full 20 days. Popular, actively shared links will never expire.
Yes, completely safely! ShiftLink uses namespaced key prefixes (for example, url:my-slug vs photo:image_102). You can also bind a dedicated secondary KV namespace in your wrangler.toml configuration if you prefer 100% isolation.
Traditional web apps route requests to a single web server in one data center, requiring thousands of miles of transit. Cloudflare KV replicates keys across hundreds of cities worldwide. When someone types your short URL, the nearest edge server answers immediately with an HTTP 301/302 redirect header.
Yes. Simply change the dropdown from Delete if unused for 20 Days to Permanent Record (Never Expire). The link will remain in your KV store forever until you explicitly delete it.
Never. ShiftTools is strictly privacy-first. There are zero tracking pixels, zero marketing cookies, and zero commercial analytics injected into your links. Only aggregate click counts stored directly in your KV record are recorded.
Short link copied to clipboard!