Liyas Thomas
Liyas Thomas


Liyas Thomas

How to create your own custom URL shortener in 10 minutes for free & deploy to GitHub ๐Ÿš€

How to create your own custom URL shortener in 10 minutes for free & deploy to GitHub ๐Ÿš€

Liyas Thomas's photo
Liyas Thomas
ยทJul 11, 2019ยท

min read

Play this article

sorry for the long post title - that's tldr;

๐Ÿ”— mnml URL - Modern URL shortener with support for custom alias

(short form for minimal URL ๐Ÿคฆโ€โ™‚๏ธ)

Feel free to contribute on GitHub

While the rest of us were copy-and-pasting mumbo-jumbo from URL shorteners into our Twitter accounts, sites like The New York Times were smugly tweeting their links using shortened URLs like "" Frankly, this made me a little jealous ๐Ÿ’โ€โ™‚๏ธ

That's why I created my own freaking url shortener with pure JavaScript + HTML + CSS โค

Did I mention this is all free of charge and 100% open source? Yes.

mnml URL makes it easy for the average Joe developer to create a custom URL shortener for free and deploy it to GitHub ๐Ÿš€ You don't even need to own a site that gets about 17 million unique visitors per month ๐Ÿ˜

Let's get started.

step 0: Goto Click the purple COPY button to copy your endpoint.

step 1: Fork/clone mnml url repo on GitHub and optionally โญ star the project - show some โค love!

step 2: IMPORTANT: Find var endpoint on src/head.js file and replace it with your own endpoint which you copied from step 0.

var endpoint = "";
replace it with your endpoint ๐Ÿ‘†

step 3: Goto your repo settings > GitHub pages. Select master branch as source for deployment.

That's it! Site will be hosted on

EDIT 0: Minimal URL can be hosted on any website hosting services like GitHub/GitLab pages, Firebase/Heroku hosting,, etc. For hosting in such custom domains, Its advised to npm build and upload output folder. Hosting on GitHub pages was just for proof of concept.

EDIT 1: If you want to take development further, consider contributing on GitHub.

EDIT 2: IMPORTANT: Minimal URL is an experimental project. Don't shorten sensitive contents/URLs with it. endpoints are always public making shortened URLs visible for everyone.

Here's some screenshots of mnmlurl UI


Bonus: I also created a Cross browser extension โœจ for mnmlurl.

Demo ๐Ÿš€

Feel free to contribute on GitHub

If you want a heads up on my next projects, or just want to chat about the web, make sure to follow me @liyasthomas ๐Ÿ’™.

This post's banner is made with Banner generator โœจ

Share this