7 Open Source And Free URL Shortener Scripts To Create Your Own

URL shortening services, with the popularity of Twitter, has a very wide usage, probably more than anyone had expected few years ago.

These services not only makes URLs shorter but more readable & trackable. Also, some offer features like password-protecting, custom URLs & more.

Although there are very succesful services like TinyURL or bit.ly, you may still want to have your own as these services can be shut down one day like tr.im (a huge service that is closed yesterday – update: tr.im re-opened which was a good example for the stability risk of these services). Or, you may be asking for more/custom features.

Here are 7 open source & free URL shortener scripts to create your own:


Shorty - Short URL Script

Shorty is a free URL shortener script built with PHP & MySQL. It comes with an admin interface where links can be edited/deleted & number of clicks can be viewed.


Wordpress Short URL Script

It is a set of PHP scripts for running a custom URL shortening service.

It can be private or public, custom keyword URLs can be picked, counts clicks & has an API. Best of all, a WordPress plugin integrates it with your blog & links are shortened automatically.


kissa.be URL Shortener Script

This short URL script has support to shorten various inputs:

  • URL
  • e-mail
  • text
  • image

It is built with PHP/MySQL & has an API for shortening/expanding URLs.


PHP URL Shortener Script

PHPurl is a simple script to shorten URLs. Optionally, custom URLs can be defined for more readable links. The script is created with PHP & MySQL.


Basic URL Shortener Script

This is a basic URL shortening script where a custom info is required to generate the URL.


TightURL Short URL Script

TightURL is a PHP/MySQL script which has a nice spam control feature. It checks entries in various spam databases before shortening them.


phurl - Free Short URL Script

The script has a captcha & re-captcha support to prevent bots. It also comes with a basic admin interface which enables deleting URLs.


And Some Fresh Ones (updated 28 August 2009)

  • Ivan

    Correction: tr.im got shutdown, not is.gd

  • http://www.markrushworth.com Mark Rushworth

    Brilliant post and worthy of a repost on my blog! well done peeps!


  • http://easywordpressinstall.com EasyWPAdmin

    I like the idea of branding your own short URL’s. Very cool!

  • http://fantikerz.com/ Ryan Hamilton

    Phurl is my personal choice. When I was a PHP novice, I still found the code running it to be easy to understand and a good learning experience. I was off integrating it with the site’s design in no time.

    If you’re new to PHP and want to run your own url shortener, you should try Phurl.

  • koko

    tr.im is back in business http://blog.tr.im/ but i do not know which post is the original one http://is.gd/2ccWA

  • http://www.wallpaperseek.com Wallpapers

    Cool Websites , Thanks for sharing

  • http://blog.sanjayUttam.com SanjayU

    Correction: tr.im is now un-shutdown. ==> http://blog.tr.im/post/160697842/tr-im-resurrected

  • http://blondish.net Nile

    Thank you for mentioning my script PHPurl.

  • http://DotPunch.com RandallB

    tr.im is back but its funny how bit.ly offered to buy it and nambu turned them down then a few hours later was back up?

    I would watch if I was using there service, it might close down again.

    They said they would be open but you never really know.

    Plus I am going to start my own URL service something small.

  • http://www.webresourcesdepot.com Umut M.

    Thanks fixed it.

    And thanks all for the updates on is.gd being re-opened. Edited the post.

  • http://iwantmyname.com Timo Reitnauer

    Good overview of Open Source shorteners. There are also some hosted URL shortening services:


  • http://www.sean-o.com Sean O

    Great list. I like Shorty’s admin panel.

    If you’re looking to create your own URL shortener from scratch, rather than downloading one, I’ve recently posted a tutorial on how to do so in under 50 lines of code:


  • http://github.com/akosma/cortito/ Adrian

    For those interested in a very, very simple URL shortener written in Ruby on Rails, try cortito: http://github.com/akosma/cortito/

    I’m using it as my own URL shortener: http://url.akosma.com/

  • http://mavrev.com Matt

    Or there’s the just released urlShort 2.0.0, which offers many of the features of popular short URL services like bit.ly in a free, open source package. http://mavrev.org/urlshort

  • http://www.thexyz.org thexyz

    Thexyz.org is good one that pays users for using it.

  • http://mini-site-design.com Janan

    Sweeet! I’ve been looking for a free script to run my own url shrinking service.

    thanks alot!

  • http://l4u.in Sharif Khan

    I like to use http://l4u.in
    It gives short domains rather than /something.
    It also gives me statistics of total clicks. Great short URL service to use.

    I suggest to this articleโ€™s author to add this link as url shorten in this article :)

    Visit http://l4u.in to create shortened/redirected URLs to any long URL.
    # AJAX interface;
    # Bulk URL shortening;
    # Password-protected URLs;
    # Temporary URLs;
    # Custom tags;
    # Custom tags for bulk URLs (automatically assigned tags like tag1, tag2, tag3 and so on);
    # Redirects statistic โ€“ referer domain, referer page, visitorโ€™s IP (+ link to geographical information about each visitor), date;
    # URLs and hits statistics can be seen even without registration (IP-based authorization);
    # Registered users: edit/delete URLs;
    # Mass upload URLs from file;
    # Export links to CSV file;

  • http://url.akosma.com/ Adrian

    Where’s cortito?
    BSD license, done in Ruby on Rails ๐Ÿ˜‰

  • http://mideos.com Samin Shams

    http://ur1.ca/ is also open

  • http://prima-travel.biz/ Wahyu

    Kissa.be url shortener service is shutdown

  • http://ranacseruet.blogspot.com/ endless beginning

    nice collection. I am going to adapt one. Can you please tell which one is the best overall?

  • http://www.heftelstudios.com Kawika

    Great list, thanks! I didn’t know there were so many URL shorteners to choose from.

  • http://www.url123.com Bid Directory

    Nice list and post. I was looking for a URL shortener script and I’m sure I can find one here.

    It looks like I’ll be trying phurl.

    Thanks for the informative post. Bookmarked!

  • Michel

    There is also the open-source php tool based on the symfony framework : http://xav.cc

    The source is available at https://opensource.lacot.org/xav.cc/svn/trunk/

  • http://www.ckcybers.com web designer

    ehm.. which one of them that using ajax ?

  • http://informationaboutcaves.awardspace.info Akif

    Yeah! Thats Working. Thanks for this URL Shortener!

  • http://www.spargrube.de Alex

    @webdesigner: YOURLS used AJAX!

  • http://trul.tk Francisco

    Excellent Scripts, I personally like the phpurl, it’s excellent.

    Thanks for this blog

  • http://www.bernav.com Shayen

    I am going to install it at http://www.ho.pe / its a short and memorable domain name :)


  • http://www.submitlinkurl.com/ Manim

    Hi Friend,

    I am looking the script for the following purpose.

    Is there any open source script to “Open multiple URLs” at once?

    Thanks in advance!

  • http://tinyurls.me SolY Mounir

    Thank you for that post , i`m searching for a script which make me wait 5 seconds in a page with Ads , and then redirects me to the destination , anybody knows which one is like this ?

  • http://localbizcenter.net Alyster

    With the popularity of Twitter and facebook, this is a good way to have your own shortening script on the website. I think I’ll try phurl.

  • http://idiotnesia.com nurussadad

    Thanks a lot.. I want to make a url shirtener service too ๐Ÿ˜€

  • http://www.localseoworks.com Carl Williams

    I will definitely be using yourls starting asap. I was on a webinar a couple of weeks ago and heard about it but forgot the name. Thanks for providing information on it.

  • http://gtatrader.com ger

    i tried PHPurl and i can’t login to the admin. some error on line 13. followed the readme step by step. garbage!

  • http://intensewebsites.com/ Derek Moore

    Awesome list (and comments) Thanks for posting it. I’m trying to figure out which software to use. Here is one for Drupal which looks promising:


    Working Example:

    My site shortened:

  • http://ginva.com/ Ginva

    thank’s for the great list, i want to create my own url shortener.

  • http://25c.biz Peter

    Thanks for post i’ll try phpURL :)

  • http://www.jehzlau-concepts.com/ jehzlau

    exactly what I’m looking for! ๐Ÿ˜€ gonna try them all and see which works best ๐Ÿ˜€

  • OCD

    YourLS is by far the best one freely available on the market. Very professional, well designed and FAST. Has all or most of the features I wanted including Plugin support and API. Good administration interface. The rest do not come close. If your going to spend time developing your code then this is a package to use.

    Installation was a breeze. Just like wordpress.

    Thanks to the writer ohz..@ http://yourls.org

  • http://six.cu.cc Daniel

    Mini URLs is a relatively new url shortening script that is based on php and mysql. When you install it on your server and get it running, you can not only shorten urls, . You also get an API to work. A โ€˜/stats/โ€™ in any shortened url gets you its stats and number of page views. You can check out a demo, multi language, administrator page.

  • http://cmil.me Clint

    Got YOURLS working in 10 minutes. Pretty good!

  • http://jd-software.blogspot.com/ Eloktavian

    Thx you 4 sharing…. awesome all.
    Confused to choose one :(

  • http://scriptoggle.com crivion

    I would add this great one http://scriptoggle.com/web-scripts/scripts/free-url-shortening-script. It’s simple, shiny and has an admin panel

  • http://www.infohiway.net/ Marvs

    Great share, will try some to see which one works best for me. :)

  • http://www.wanesa.pl Wanesa

    The YOURLS is really great. As simple to operate as it can be. The most important for me was the ability to edit very easily the links added previously. So if you for example sell something on Allegro (it’s a “Polish eBay”) continuosly, you may still promote your auctions with the same shorten-links all over the Internet (FB, e-mails, other social network pages, forums). And the only thing you do when your auction expires is a little change to a current auction URL in the script’s panel. And all the links everywhere are valid again! That’s exactly what you can achieve with mentioned script.
    Probably many others do the same, but I stick to YOURLS. And the stats… Simply great.

  • http://helloMonster.ca Hello Monster

    YOURLS is the only way to go, hands down. The api alone is worth it, but if you are using wordpress, the author, ozh, is a published legend. You couldn’t do better if you paid for it.

  • http://timesurl.at/ Yours

    Hi there,

    YEAH just what I was looking for to offer on my url shorten site. I will try this one with yourls.org and give you a notice if i succeed.

    Thanks a lot

  • http://pakwing.com kamal ashraf

    phurl is best, i like this very much as it support bookmark button in bookmark bar like like google bookmark.

  • http://yi.tl Anthony

    I opted for YOURLS and wasn’t disappointed. This is what I created: http://yi.tl

    yi.tl is the first URL shortener to offer support for category tags. This unique service allows users to group related URLs and easily retrieve old links. To save time, the site will even make tag suggestions based on the URL being shortened.

  • http://salagau.inube.com/blog/3736090/pari-island/ Lenard

    I love looking through a post that will make people think. Also, thank you for permitting me to comment!

  • http://www.bloglog.com/blog/salagau/346771/paket-trip-pulau-pari Regan

    If some one wants to be updated with latest technologies then he must be pay a quick visit this web site and be up to date all the time.

  • http://salagau.soup.io/post/398998772/Pulau-Pari-Wisata-Pulau-Seribu Cleta

    Hello colleagues, its impressive article regarding tutoringand entirely defined, keep it up all the time.

  • http://diary-of-a-mean-hamilton-mother.blogspot.ca/ Janine

    Great beat ! I would like to apprentice while you amend your web site, how could i subscribe for a blog site? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear idea

  • http://www.truelocal.com.au/business/cool-cubbies-cubby-houses/melbourne Gavin

    Nice post. I learn something new and challenging on sites I stumbleupon every day. It’s always interesting to read through articles from other authors and practice a little something from their sites.

  • http://Headlinecolors.com/obtaining-informative-and-unique-essay-in-writing.htm Lily

    Good one particular! Love it! Thanks!

  • http://skoltsami.com/advanced-writing-solutions Antonetta

    I might see the ideal article writer employment service to get a lots of supreme details regarding this excellent theme generally if i were definitely you!

  • http://tiny.cc/japanesemature Sherrill

    Hi, the whole thing is going well here and ofcourse every one is sharing facts, that’s really excellent, keep up writing.

  • http://tiny.cc/japanesemature Dessie

    It’s awesome designed for me to have a web site, which is valuable designed for my knowledge. thanks admin

  • http://tiny.cc/japanesemature Damian

    Every weekend i used to pay a quick visit this web site, for the reason that i want enjoyment, for the reason that this this site conations actually nice funny stuff too.

  • http://tiny.cc/japanesemature Kareem

    naturally like your web site but you need to test the spelling on quite a few of your posts. A number of them are rife with spelling problems and I in finding it very bothersome to inform the truth then again I’ll certainly come back again.

  • http://tiny.cc/japanesemature Jacklyn

    This article is in fact a nice one it helps new internet viewers, who are wishing in favor of blogging.

  • http://tiny.cc/japanesemature Chas

    Thank you, I have recently been searching for information about this subject for a long time and yours is the greatest I’ve came upon so far. But, what concerning the bottom line? Are you positive about the supply?

  • http://tiny.cc/japanesemature Meredith

    Spot on with this write-up, I actually believe this website needs much more attention. I’ll probably be back again to read through more, thanks for the advice!

  • http://tiny.cc/japanesemature Charlie

    It’s an awesome post designed for all the web users; they will obtain advantage from it I am sure.

  • http://undereyewrinklescream.wordpress.com/ Minerva

    And of course, using this eye wrinkle cream on the area under your eyes for so long, you can’t remember when anti eye wrinkle cream reviews they first appeared? The best over the counter eye wrinkle cream which can help figure out and solve your problem.

  • http://tiny.cc/japanesemature Rich

    Wonderful beat ! I wish to apprentice at the same time as you amend your website, how could i subscribe for a weblog website? The account aided me a applicable deal. I have been tiny bit acquainted of this your broadcast offered brilliant clear concept

  • http://tiny.cc/japanesemature Georgina

    I am no longer sure where you are getting your information, however great topic. I must spend some time finding out much more or figuring out more. Thanks for excellent information I was searching for this information for my mission.

  • http://tiny.cc/japanesemature Arlen

    Howdy! I’m at work surfing around your blog from my new iphone 3gs! Just wanted to say I love reading through your blog and look forward to all your posts! Keep up the excellent work!

  • http://Castroloilchange.net/castrol-engine-oils-will-never-let-you-down/ Jonnie

    It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I wish to suggest you some interesting things or suggestions. Perhaps you can write next articles referring to this article. I desire to read more things about it!