The mind of the six billionth one…
QR Code and 2D Code Generator
This page is an online two dimensional code generator which is written in PHP. It can generate QR Code, Data Matrix, Aztec Code and Micro QR Code for the time being. Because QR Code is much more popular than the other code formats, it is separately named in the page title. If you need more information on two dimensional bar code systems, I suggest that you take a look at Roger Smolski’s comprehensive blog on QR Code and two dimensional bar codes.
Using the form on this page, you can create two dimensional code images that trigger various actions on the reader device. You can use this form on both your desktop browser or your new generation mobile device (like iPhone). You can find the explanations under the form. If you like this page and you have ideas to implement, please give feedback, so that I can improve the page. So far, this page created 49462 codes since I started counting in January, 2010. Seems like especially QR Codes are getting more and more popular outside the far east.
Please be sure to read the Notes section below, if you encounter any problems with code generation (Especially for Micro QR Codes!).
If this generator has somehow been useful to your commercial business, perhaps you would consider contributing by clicking the PayPal button below.
Notes:
The generator tweets (does not tweet your input!) as @qrcodegen on Twitter with every new generated 50th 2D code. Also, you can follow me on Twitter through @kerem_erkan. If you liked this generator, I would really appreciate it if you could recommend it on Facebook by clicking the “Recommend” button on top of the page, or tweet about it by clicking this link.
Data Matrix and Aztec Code have significantly lower capacity (4096 alphanumeric characters for QR Code, 3067 for Aztec Code and 2335 for Data Matrix), so if you would like to encode a lot of text, select QR Code. Be aware that, although you give an input consisting of only alphanumeric characters (i.e. lowercase and uppercase ASCII characters and numeric digits only), the maximum capacity strongly changes with the density of letters vs digits. So it is impossible to guarantee that your input will successfully be encoded before trying to encode it. If it cannot be encoded, the generator will give a warning. In that case, lower the character count in your input and try again.
To create the best readable code for long URLs, use one of the URL shortening services so that the resulting code is as small as possible. I personally prefer bit.ly over TinyURL.
Micro QR Code cannot hold more than 35 numeric and 21 alphanumeric characters, and it can hold even less characters when you add non-alphanumeric characters like “/” to your input. So it can only be used for very small URLs or text input (It cannot even hold a bit.ly URL when you prefix it with “http://”). But it is more efficient than QR Code when you use it with very small inputs.
If your device cannot interpret the encoded 2D Code properly, it probably means your reader program is written poorly or does not have the capability of decoding that particular code format; or your device does not accept that action, because all codes created by this script and the content within them are compliant to all necessary published standards (vCard standards, URL encoding schemes, NTT DoCoMo standards, etc.).
While we are talking on standards, let me open the topic up a little bit more. Sadly most readers out there do not follow special character escaping standards. Characters like “:” or “;” are special characters in vCard, meCard or vEvent specifications, and they should be properly escaped for the input to be interpreted correctly. This generator follows these standards correctly, and so a URL field like “http://example.com” becomes “http\://example.com” after escaping. The problem is, readers like QuickMark do not know how to handle this escaped character and break altogether. If you encounter such problem, select No for Escape Special Characters in vCard, meCard or vEvent creation. But while you will be able to read those QR Codes in broken readers, be aware that, your 2D Code will not be standards compliant and you may not be able to add a URL that includes a second colon (for example as a port number separator) or semicolon when you do that.
Aztec Code may not support UTF-8 characters for the time being, so if you encounter such a problem try QR Code or Data Matrix. Another caveat of Aztec Code is that, it is not supported by most of the reader programs out there. As for Kanji and Cyrillic characters, only QR Code should support them, but I don’t have feedback for those yet (Can anyone who can read Kanji or Cyrillic characters confirm that?).
Always use dark colors for foreground color and light colors for background color. If there is not enough contrast between foreground and background colors, your device will most probably fail to decode the code.
A note on vCard coordinates: Neither vCard 2.1 nor vCard 3.0 specification does accept parameters for coordinates like “Home Address Coordinates” or “Work Address Coordinates”, etc. So the coordinates represent the vCard itself, not any of the addresses you provide in the vCard. In vCard 4.0 spec, you will probably be able to bind geographical coordinates to your addresses.
Currently you can do the following with this form:
- You can browse to a website.
- You can bookmark a website.
- You can make a phone call.
- You can send a short message.
- You can send an e-mail.
- You can create a vCard (v2.1 or v3.0) with coordinates to add a contact to your device.
- You can create a meCard to add a contact to your device.
- You can create a vCalendar event to add to your calendar.
- You can open location coordinates in Google Maps on your device (works on iPhone and Android).
- You can create
market://URLs for searching for publishers or packages on Market app for Android. - You can create special
youtube://URLs for YouTube app on iPhone. - You can fetch and encode the latest tweet of a Twitter user.
- You can create a mobile URL to tweet on Twitter.
- You can create a mobile URL to update your Facebook status (UPDATE: Does not work for the time being. I am searching for a workaround.).
- You can read plain or free formatted text on your device.
You can change the block size of the generated image to make it bigger or smaller. Also, you can change the margin size of the image to add more quiet zone if your decoder cannot decode it (Especially Data Matrix seems to need bigger margin sizes). Error correction level for QR Code (ignored for other code types) can be set to 4 different values and higher values may cause the image to be decoded slightly slower. The 4 values can be explained like this:
- Low (L): Up to 7% of errors can be corrected.
- Medium-Low (M): Up to 15% of errors can be corrected.
- Medium-High (Q): Up to 25% of errors can be corrected.
- High (H): Up to 30% of errors can be corrected.
You can choose PNG, PDF, SVG or EPS outputs. SVG will output a vector image XML file, and you can edit it in applications like Adobe Illustrator or Inkscape.
Please be aware that while I make checks for illegal characters to protect my server, I do not check your input for a meaningful value. For example, if you enter letters for phone number in “Make a Phone Call” action, and your device initiates a nuclear launch sequence in a forgotten former U.S.S.R. rocket silo, it will be your problem, not mine.
The image generation is done using third party encoders. I have only written a handy PHP front end that formats your input and passes it to these encoders.
You will need some 2D code decoder software on your mobile device to be able to read these codes. If a decoder is not preinstalled, you may find one, suitable for your device from Kaywa or QuickMark. I haven’t been able to find a good decoder supporting all formats and all actions on iPhone yet.
- PHP QR Code Generator « Kerem Erkan’s blog « Netcrema – creme de la social news via digg + delicious + stumpleupon + reddit
- PHP QR Code Generator « Kerem Erkan’s blog : Popular Links : eConsultant
- TwittLink – Your headlines on Twitter
- Script QR-Encoder + QR-Decoder – Script, Blog, Dateien, Decoder, Einen, Leider, Beispiel, QR-Decoder – Blog von Lutz Nelde
- links for 2010-01-16 | Digital Rehab
- PHP Wrapper for Libqrencode
- uberVU – social comments
- QR Codes: The Way of the Future. Don’t get left Behind! « thekruser.com
- QR Codes: The Way of the Future. Don’t get left Behind!
- vivanno.com::aggregator » Archive » Qrcode générator
- Qrcode générator | traffic-internet.net
- Kyle Cheung – links for 2010-03-09
- uberVU – social comments
- Делаем QR-код на PHP | Webspecial.ru – Веб-программирование, linux и другое
- Tweets that mention QR Code and 2D Code Generator | Kerem Erkan — Topsy.com
- Générateur de Qr code | emandarine
- URL ต่างๆในความรับผิดชอบมันยาวไปไหม » Home For OARIT Developers
- Lav dine egne QR koder | CPH Cloud
- Why Puting a QR Code on a Business Card is a Gamble | Peg Leg Print Shop




about 3 months ago
OK I understand.
The field you added is indeed what i mean.
I tested the ‘location name’ field.
Barcode scanner understands the ‘event summary’ and also the day and time information.
it als shows the button ‘add to agenda’
Unfortunately it doesn’t pick up the information from the field ‘Location Name’
May be it is not standard yet in vCalender?
well…Thanks any way… let’s say: to be continued
about 3 months ago
May be you understand this better than me:
vCal (Calendar)
Scanning a QR code with this symbol will add this event to your calendar.
Ex: http://www.mskynet.com/qrgen?qt=vcal&title=Birthday&... http://www.mskynet.com/qrgen?qt=vcal&title=\t &desc=\d&loc=\l&email=\e &sYear=\sy&sMonth=\sm&sDay=\sd &sHour=\sh&sMin=\sn&sOffset=\so &eYear=\ey&eMonth=\em&eDay=\ed &eHour=\eh&eMin=\en&eOffset=\eo &alarm=\a *Note: Please URL encode the following parameters. * \t - Title, e.g. "Birthday". * \d - Description, e.g. "Barcode's 58th Birthday!". * \l - Location, e.g. "Seattle, WA". * \e - Organizer's Email, e.g. "noreply@mskynet.com". * Start date/time o \sy - Event start year, e.g. "2010" o \sm - Event start month, e.g. "10" o \sd - Event start day, e.g. "07" o \sh - Event start hour, e.g. "12" o \sn - Event start minute, e.g. "30" o \so - Event start UTC offset, e.g. "-8" for (PST) * End date/time o \ey - Event end year, e.g. "2010" o \em - Event end month, e.g. "10" o \ed - Event end day, e.g. "07" o \eh - Event end hour, e.g. "13" o \en - Event end minute, e.g. "30" o \eo - Event end UTC offset, e.g. "-8" for (PST) * \a - Alarm in minutes, e.g. "15". (default: disabled) * width - width in pixels. (default: autosize) * cap - url encoded caption text. (default: none) * subcap - url encoded subcaption text. (default: Add * to Contact) * nocap - 1 to disable subcap. (default: enabled, 0) * col - hex color value. (default: black, '000000') * bgcol - hex color value. (default: white, 'FFFFFF')I got it from:
http://www.mskynet.com/static/QRGenAPI
about 3 months ago
They are not encoding a vCalendar event code. They are creating a URL QR Code, which redirects your browser to a page on their server, which then creates an ics (iCalendar format) file and prompts you to download to your device.
It is a completely different approach. My generator on the other hand, encodes the content of that ics file directly into a QR Code. When it is encoded into a QR Code, the reader program has to interpret it correctly. But when it is downloaded via the browser, the reader has nothing to do with interpreting the vCalendar event. So, my generator relies on the capabilities of the reader program. Their method is very easy to implement but it is not a good way to improve the reader capabilities.
On a side note, LOCATION field is a standard since vCalendar 1.0. Unfortunately the reader program on Android cannot interpret it. The GEO field is also the same.
Because QR Codes on mobile devices are new to the western world, most of the reader programs cannot interpret many codes, even though those codes are created according to RFC standards. It is a similar situation here. Maybe you should write this as a feature request to Google’s ZXing project, since they are the makers of the barcode reader on Android.
about 3 months ago
OK This is a very good and usefull explanation, I see the difference in the two approaches and I completely agree with you, that your way is the way to go.
about 3 months ago
Thanks. I hope to see better reader programs in the future if QR Codes gain more momentum. Until that time, sadly all functions of my generator will not be available to everyone.
about 3 months ago
Okay,… maybe I’m totally dumb, but where exactly can I find the source code of your (btw: awesome) QR code generator?
I searched through your whole blog (nearly), but couldn’t manage to find a download…
Thanks in advance,
Martin
about 3 months ago
Martin, thanks for your interest. I am not sharing the source for the time being.
about 2 months ago
Most impressive generator I’ve found – great work. Too bad this powerful format isn’t mainstream yet…
about 2 months ago
Thanks Noel. Probably QR Codes will go mainstream when Facebook implements them.
about 2 months ago
I hope to use QR Code in the printing of products, t-shirts, mouse pads, and much much more.
Your generator is “AWESOME”. The url portion came out from info in the “email”. So the url showed as my email. Other than that I found it to be the absolute best QR Code generator out there.
about 2 months ago
Thanks David,
Can you elaborate on your problem? Did you try the “Website” action and it ended up as an email? I could not understand that.
about 2 months ago
When I used the “MeCard” feature is when I got my email contact in both email and url .
about 2 months ago
You found a bug! Thank you, your feedback is much appreciated. I corrected the problem, the url shows as expected now.
about 3 weeks ago
A friend said that in Japan they use it a lot. Of course, they are mobile maniacs, so all the stores have QR codes in the products.
Great generator. I already Twit this page, now I gonna blog it.
about 3 weeks ago
Yes, especially in Eastern Asia QR Codes are used for everything. The western world is slow at adopting these codes but lately with smart phones we have started seeing more and more of these codes everyday. I have been working on QR Codes since 2006 and I am glad to see that my predictions were true about them.
Thank you very much, I would appreciate links to the generator.
about 2 months ago
I really like what you showed here. Just the thing I was looking for. Please let me know if there is a chance we could talk about using this generator on my website? Thanks.
about 2 months ago
How come I cannot make a micro qr code? I’ve entered something as small as 23 characters with a only letters and a . and a -
about 2 months ago
Well, as you can read in the Notes section, Micro QR Code can hold only 21 alphanumeric codes.
about 2 months ago
Do you recommend a particular micro QR reader?
about 2 months ago
Cannot. Actually it would be great if we could get some feedback about reader programs and platforms from people.
about 1 month ago
Dear Kerem, thank you for your great coding machine. here are a couple of my concerns.
I do help my customers with implementing the QRcodes in Montreal Canada. Since an update in i-nigma and mobiletags the url in Bookmark tag shows up with “;;” at the end making it impossible to follow, while zxing, an ixMAT readers still perform well…
Actualy zxing reader is one of the most reliable reader for Android and iPhone version free under “Barcodes” in i-store, while i-nigma is the most recomended on Blackberry at least here in eastern Canada.
OK you are not distributing your coder’s code, but could we embed it in my website for example… building a kind of Cloud coding…
about 1 month ago
Hello J.F,
I have removed the “;;” part and tried it with Kaywa and Quickmark. They both identified the bookmark correctly, so I will leave it as is, most probably the problematic readers will also interpret the code correctly now.
Also thanks for your feedback about the reader programs, it is much appreciated.
I will contact you via mail about your other question.
about 1 month ago
Thanks for your prompt reply.
Can’t wait to read your mail.
jfokane
http://www.promoscan.info
about 1 month ago
Hi J.F.
The mail I sent to your address which you entered for your comments bounced back to me. Please contact me via e-mail and I’ll reply to you resending that mail again.
about 1 month ago
Hi
What library do you use to generate micro qr code ?
Thanks
about 1 month ago
I am using Zint. I mentioned it in my latest blog post.
Cheers.
about 3 weeks ago
Could you please add
xmlns=”http://www.w3.org/2000/svg”
to your svg tag? Without it it’s difficult to embed SVG as an image.
Thank you for the encoder — it’s the best!
about 3 weeks ago
Hi, I added the version attribute, xml namespace you suggested and other two other xmlns attributes (XLink and XML Events) to the SVG output. I would appreciate it if you could test it and give feedback.
about 6 days ago
I’m getting mixed results creating QR Codes here and scanning with Quickmark…
This mecard works:
“URL:http://webaddress.com;;”
This mecard URL breaks the whole entry:
“URL:http\://webaddress.com;”
I seem to get inconsistent creations using this generator. I have a control image I check to make sure the scanner is working.
When it works it’s great but I’d love to see this solved!
about 6 days ago
Well, that’s because QuickMark does not follow escaping standards for meCard. As you can see “:” is a separator for different fields, it should be escaped for consistency. While QuickMark seems to have solved this problem, they actually did not, and their reader can get confused when you have to enter more complex URLs into the URL field other than a simple http://webaddress.com.
I will add a “Don’t escape special characters” checkbox to the generator for testing those reader programs that don’t want to follow the standards, but when you select that, while your reader can read the code successfully, other programs may not be able to, because the generated QR Code will not be standards compliant.
about 2 days ago
Hi,
I have noticed some incopatibilities between similar code types and subtypes – namely, QR with meCard embedded. Reader I am using (i-nigma) properly recognizes meCard created by other encoder but fails to read yours. I am assuming this is not a parsing issue but rather different metadata naming convention (even though it should be standardized)?
about 2 days ago
Have you tried “Escape Special Characters” -> “No” option on my generator?
about 2 days ago
Yes. The working code is different than yours (both versions – with and without escape special chars). Maybe different implementation of meCard?
about 2 days ago
Please send me the address of that generator, or a working QR Code via e-mail and I’ll check what I’m doing different. I have been following standards from the start, but everyone can make a mistake or two
You can find my e-mail address in my Contact page.
about 18 hours ago
Can you share where you found a QR code reference which tells you what data needs to be embedded in the QR code image? I’d like to implement a form like you have, but use the PHP QR Code library. I don’t know how to formulate the string that needs to be embedded in the bar code.
Thanks for any help you can offer.
about 18 hours ago
Oops. Spoke Too soon. I had to follow quite a few links to finally get to it, so here it is one resource for others:
Anatomy of QR Code data: http://code.google.com/p/zxing/wiki/BarcodeContents
about 17 hours ago
Thanks. I think I have mentioned this page somewhere in the comments, but I am not sure, and I cannot check the site fully at the moment.