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
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.
YOURLS
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!
This short URL script has support to shorten various inputs:
- URL
- text
- image
It is built with PHP/MySQL & has an API for shortening/expanding URLs.
PHPurl
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.
BrokenScript
This is a basic URL shortening script where a custom info is required to generate the URL.
TightURL
TightURL is a PHP/MySQL script which has a nice spam control feature. It checks entries in various spam databases before shortening them.
phurl
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)
- Tags:
API Mysql Php
- Filed under: Extras, Other License, Tools
- 52 Comments






















52 Responses for "7 Open Source And Free URL Shortener Scripts To Create Your Own"
Correction: tr.im got shutdown, not is.gd
[...] fuente: webresourcesdepot.com [...]
Brilliant post and worthy of a repost on my blog! well done peeps!
http://markrushworth.com/template_permalink.asp?id=403
I like the idea of branding your own short URL’s. Very cool!
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.
[...] Si tienes un dominio y hosting, instala tu propio servicio acortador, y usalo de manera privada. Esto tampoco evita el asunto de los links rotos, pero si algún día tu dominio deja de existir, los únicos enlaces que se pierden son los tuyos. Gran diferencia. @gonzalolopez publicó en Twitter (y con bit.ly
) un buen link a 7 scripts para crear tu propio acortador de direcciones. [...]
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
Cool Websites , Thanks for sharing
Correction: tr.im is now un-shutdown. ==> http://blog.tr.im/post/160697842/tr-im-resurrected
Thank you for mentioning my script PHPurl.
[...] reading some stuff at internet I have found an article about 7 PHP scripts to generate shorts URLs. This kind of links are very common today with a lot of controversy about the security risk that [...]
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.
[...] course, there are more free URL shortener scripts that you can download. In fact, WebResources Depot has a great [...]
@Ivan,
Thanks fixed it.
And thanks all for the updates on is.gd being re-opened. Edited the post.
Good overview of Open Source shorteners. There are also some hosted URL shortening services:
http://iwantmyname.com/blog/2009/08/10-tools-to-run-an-url-shortener-on-your-own-custom-domain.htm
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://sean-o.com/short-URL
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/
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
Thexyz.org is good one that pays users for using it.
Sweeet! I’ve been looking for a free script to run my own url shrinking service.
thanks alot!
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
Features:
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;
Where’s cortito?
http://github.com/akosma/cortito/
BSD license, done in Ruby on Rails
Enjoy!
http://ur1.ca/ is also open
Kissa.be url shortener service is shutdown
nice collection. I am going to adapt one. Can you please tell which one is the best overall?
Great list, thanks! I didn’t know there were so many URL shorteners to choose from.
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!
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/
ehm.. which one of them that using ajax ?
thanks
Yeah! Thats Working. Thanks for this URL Shortener!
@webdesigner: YOURLS used AJAX!
Excellent Scripts, I personally like the phpurl, it’s excellent.
Thanks for this blog
I am going to install it at http://www.ho.pe / its a short and memorable domain name
thanks
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!
Manim
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 ?
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.
Thanks a lot.. I want to make a url shirtener service too
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.
i tried PHPurl and i can’t login to the admin. some error on line 13. followed the readme step by step. garbage!
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:
http://www.lullabot.com/articles/drupal-url-shortener
Working Example:
http://lb.cm
My site shortened:
http://lb.cm/iw
thank’s for the great list, i want to create my own url shortener.
Thanks for post i’ll try phpURL
exactly what I’m looking for!
gonna try them all and see which works best
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
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.
Got YOURLS working in 10 minutes. Pretty good!
Thx you 4 sharing…. awesome all.
Confused to choose one
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
Great share, will try some to see which one works best for me.
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.
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.
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