A professional, responsive URL shortening service powered by Cloudflare Workers.
π Open URLShorter Β Β β’Β Β π Try Example
- β‘ Lightning-fast URL shortening
- π Clean, shareable short links
- π One-click Copy button for generated URLs
- π± Fully responsive on mobile, tablet and desktop
- βοΈ Light Mode enabled by default
- π Beautiful Dark Mode
- π‘οΈ Optional security/CAPTCHA integration
- π Optional URL safety checking
- β»οΈ Unique short links
- β±οΈ Optional link expiration
- π CORS support
- π¨ Modern animated interface
- π Cloudflare Worker deployment
https://go.abdullah.nyc.mn/ANiFZm
Open Cloudflare Dashboard β Workers & Pages β KV and create a new KV namespace.
Choose any name you like. For example:
links
πΈ Example:
Open your Worker and go to:
Settings β Variables β KV Namespace Bindings
Add a KV binding.
Variable name:
LINKS
Then select the KV namespace you created in the previous step.
πΈ Example:
β The Worker code expects the KV binding variable to be named
LINKS.
Open the Worker source file in this project and copy the complete Worker code.
Then open your Cloudflare Worker and replace the existing code with the copied code.
The main settings are inside the config object.
Example:
const config = {
no_ref: "off",
theme: "theme/captcha",
cors: "on",
unique_link: true,
custom_link: false,
safe_browsing_api_key: "",
expiration_ttl: 0,
captcha: {
enabled: true,
require_on_create: true,
require_on_access: true,
timeout: 5000,
fallback_on_error: true,
max_retries: 2
}
};CAPTCHA is configurable directly from the Worker settings.
You can enable or disable it with:
captcha: {
enabled: true
}The project does not require the old external demo/reference URLs.
After the KV binding and Worker code are ready:
Save β Deploy
Then open your deployed Worker and test URL shortening.
- π Open your deployed URLShorter website.
- π Paste a long URL into the input field.
- π‘οΈ Complete the security verification when required.
- β‘ Click Shorten URL.
- β Your Your short URL result will appear.
- π Click Copy to copy the generated URL.
- π Share your short link anywhere.
The modern interface includes:
- π§ Professional sticky header
- π Hero section
- π URL shortening form
- β Your short URL result card
- π Copy button
- β‘ Feature cards
- π οΈ How It Works section
- π€ About section
- βοΈ Light Mode
- π Dark Mode
- β¬οΈ Back-to-top button
- π§Ύ Professional footer
- π± Responsive mobile layout
- ποΈ Smooth animations
URLShorter starts in Light Mode by default.
Users can switch to Dark Mode from the header. The selected theme is stored locally so the preference remains on future visits.
Use this example link:
https://go.abdullah.nyc.mn/ANiFZm
π Personal website:
π Example URLShorter link:
https://go.abdullah.nyc.mn/ANiFZm
| Option | Description |
|---|---|
no_ref |
Controls referrer hiding |
theme |
Homepage theme |
cors |
Enables CORS |
unique_link |
Reuses the same short URL for the same long URL |
custom_link |
Enables custom short URLs |
safe_browsing_api_key |
Optional URL safety checking |
expiration_ttl |
Optional link expiration in seconds |
captcha.enabled |
Enables/disables CAPTCHA |
captcha.require_on_create |
CAPTCHA for link creation |
captcha.require_on_access |
CAPTCHA for short-link access |
captcha.fallback_on_error |
Allows degraded operation if CAPTCHA has an error |
For production use:
- π Keep API keys private.
- π§± Configure Cloudflare Worker bindings correctly.
- π‘οΈ Keep security protection enabled when appropriate.
- π Test redirects before publishing.
- π« Never expose private credentials in frontend code.
Designed for:
- π₯οΈ Desktop
- π» Laptop
- π± Mobile
- π² Tablet
The layout automatically adapts to different screen sizes.
URLShorter/
βββ index.js
βββ README.md
βββ docs/
βββ urlshorter-preview.png
βββ cloudflare-worker-settings.png
βββ cloudflare-kv-binding.png
Fast. Secure. Simple.
Built by Abdullah Bin Shahid

