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.

Using the form on this page, you can create two dimensional code images that trigger various actions on the scanner device. Don’t forget to install Qrafter or Qrafter Pro (why two versions?) to scan and generate QR Codes if you have an iPhone or iPad. So far, this page created 4,995,004 codes since I started counting in January, 2010.

Please be sure to read the Notes and FAQ sections below before requesting help in the comments if you encounter any problems with code generation (Especially for Micro QR Codes or backslash characters you may encounter on some codes!).

This page is very popular and because of that, it gets an incredible amount of comment spam. Sometimes legitimate comments can get caught as spam and I can miss them, so if your comment does not appear after some time, you can contact me from the email address on my contact page.

READ THIS FIRST:

I am getting many questions about scanning the codes created on this generator. Most of them are about some problem with the scanner not detecting the content of the code properly. This generator follows established standards strictly and most scanner apps except Qrafter and Qrafter Pro for iOS don’t follow those standards completely. So, if you somehow end up with an unexpected result after scanning a code, it is because that your scanner was developed lousily. If you are on iOS, use Qrafter or Qrafter Pro for guaranteed standards compatibility. For other platforms, please contact the developers of your scanner app to tell them to start following the standards that were established for a reason.

Select a Code Action:
Code Type: QR Code (recommended)
Data Matrix (only ASCII chars)
Aztec Code (only ASCII chars)
Micro QR Code (only ASCII chars)
Bookmark Title: *
Web Site URL: *
Phone Number: *
SMS Message:
Mail Recipient: *
Subject:
Body:
Escape Special Characters (like colon, semicolon or comma): Yes
No
IMPORTANT: Please check notes on escaping in Notes section.
Version: 2.1
3.0
vCard Type: Real Person
Company
First Name:
Middle Name:
Last Name:
Organization:
Title:
E-Mail Address:
Mobile Phone:
Video Call Phone:
Work Phone:
Work Fax:
Home Phone:
Work Address: Street:
City:
State:
ZIP Code:
Country:
Home Address: Street:
City:
State:
ZIP Code:
Country:
Address: Street:
City:
State:
ZIP Code:
Country:
Work Web Address:
Home Web Address:
Web Address:
Birthday:
Event Format: Fully Compliant to iCalendar Standard Compliant to ZXing Proposal
Event Summary: *
Event Description:
Full Day Event: Yes (Only uses start date and end date) No (Also uses start time and end time)
Start Date:
Start Time:
End Date:
End Time:
Text: *
NOTE: Google Maps will be used to select the coordinates, but the resulting url will be a Bing Maps URL.
Location Name:
 
Twitter User: *  
Prepend username before tweet
Twitter User: *
Text to Tweet: *
Search Type: Publisher Search Exact Package Name
Market Search: *
Package Name: *
Youtube Video ID: *  
Enter either only the YouTube video ID or full URL for the video.
iTunes App ID: *  
Enter either only the App ID or full URL for the app on iTunes.
Venue ID: *  
Enter either only the venue ID or full URL for the venue.
Facebook Status: *
BBM Pin: *
SSID: *
Password:
Network Type:
URL Shortening:
(will use full url in case of error)
Error Correction Level:
(only for QR Code)
Block Size in Pixels:
Margin Size in Blocks:
Output Type:
Foreground Color:     Transparent
Background Color:     Transparent
Qrafter Banner

Notes:

You can follow me or Qrafter on Twitter.

QR Code is far more widespread than Data Matrix, Aztec Code or Micro QR Code. Actually Micro QR Code is rarely used and is only given here as a technology preview. If you want to create a campaign for your products using a 2D Code, make sure that you are using QR Codes, not the other types.

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.

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 the others.

Micro QR Code cannot hold more than 35 numeric and 21 uppercase alphanumeric characters, and it can hold even less characters when you use lowercase characters. When encoding a URL into a Micro QR Code, try using all uppercase characters for longer URLs. I don’t know of a scanner that supports Micro QR Code though.

If your input cannot be encoded, the generator will give a warning. In that case, lower the character count in your input and try again.

If your device cannot interpret the encoded 2D Code properly, it probably means your scanner 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 scanners 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, some scanners 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 scanners, 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. If you are on iPhone or iPad, I strongly suggest that you ditch your broken scanner and download Qrafter or Qrafter Pro. They are fully compliant to said standards. This way, I hope that developers will be forced to create scanners that obey standards that were established for a reason.

Data Matrix, Aztec Code and Micro QR Code do not support characters other than ASCII because of their spec, so if your input has international characters, always use QR Code. Another caveat of Micro QR Code is that, it is not supported by most of the scanner programs out there. As for Kanji and Cyrillic characters, again, only QR Code should support them.

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. Another warning: The EPS version I had to use does not support transparency, so you should use another format if you are going to have transparent foreground or background in your codes.

Twitter Profile Image Overlay option overlays your Twitter profile image onto a code that includes your Twitter profile URL. Images created with this option will behave very oddly with vector image formats. You have been warned! 🙂

Currently you can do the following actions with 2D codes generated 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 create iTunes app and review URLs for iOS devices.
  • You can create market:// URLs for searching for publishers or packages on Market app for Android.
  • You can create Foursquare venue URLs.
  • You can create special youtube:// URLs for YouTube app on iOS.
  • You can fetch and encode the latest tweet of a Twitter user.
  • You can overlay a Twitter profile image over the code.
  • You can create a mobile URL to tweet on Twitter.
  • You can connect to a WIFI network on Android devices.
  • 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.

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.

A note about printing from Roy, a fellow user of this generator: When codes are generated, they are created in RGB (my note: yes even if they are black and white, they are in RGB colorspace) and if they are used in printing, they should be converted to grayscale or CMYK so that, when printed, only the black plate is used. This ensures the highest edge resolution, particularly in smaller sizes.

QR Code Scanners:

The best scanner apps for iPhone and iPad are Qrafter and Qrafter Pro. They are available on the App Store. They are designed for both iPhone and iPad and Qrafter is free with advertisements, while Qrafter Pro is paid with no advertisements. They are able to understand all actions on this generator (and more) and are the most advanced scanners for QR Codes on iPhone and iPad.

For Android, the best option seems to be the Barcode Scanner app from ZXing.

For Nokia Maemo/Meego, you can use Mbarcode according to Ryks, another commenter.

For other devices, you may find one, suitable for your device from Kaywa or QuickMark.

QR Code is a registered trademark of DENSO WAVE INCORPORATED in the United States and other countries.

Qrafter is a registered trademark of Kerem Erkan in the United States, European Union and other countries.

FAQ:

Here is an updating list of frequently asked questions.

Q: Can I change the content of a code I created if I find a mistake?
A: The codes generated on this generator are standalone, which means they have no connection to this generator after being generated. This also means they include the content directly inside them, and if the content needs to change, the generated code image will change. Please test your code images with as many devices and scanner apps as possible to avoid any problems after printing the codes.

Q: Why do I get unwanted characters like a backslash (\) or semicolon (;) in the result when I scan a QR Code?
A: You are using a QR Code reader that cannot parse the contents of QR Codes correctly. Many readers are especially weak at parsing vCards. Use a proper app from the QR Code Scanners list on this page.

Q: Do you harvest the information I enter into this form?
A: No, I don’t use the information you enter to this form in any means. After you create your 2D Code, the information is removed from my server.

Q: Can I track the scan information for the 2D Codes I create on this generator?
A: You can’t track the 2D Codes you create on this generator unless you create your own trackable URL (for example a bit.ly URL) and then enter that URL to generate a QR Code for it on this page.

Q: Do the 2D codes that were created on this generator have an expiration date?
A: No, all codes generated on this generator can be used as long as you want.

Q: Can I use the codes I create on this generator commercially? Do I need to pay any fees?
A: You can use the codes created on this generator both commercially and personally. There are no fees to pay. The only favor I ask back is the promotion of Qrafter or Qrafter Pro on your site as your recommended reader app for iOS devices. But it is only a request, you are not obliged to do that. 🙂

Q: What is the minimum size for a QR Code so that it can be scanned with all devices?
A: The answer to this question cannot be given with exact proportions. New devices with autofocus cameras can scan very small QR Codes, but old devices that don’t have autofocus cameras will have problems with scanning codes smaller than one or two inches. Also it depends on the size of the information that you put into the QR Code. You need to test your QR Code with many devices, old and new to find the best compromise.

Q: Can I overlay an image on top of the QR Code like the one in “Twitter Profile Image Overlay” action of this generator?
A: Yes you can. Create a QR Code with highest error correction and select a vector output. This way, using your preferred image editor, you can overlay an image that’s up to 30% of the QR Code. Be careful not to overlay the image on top of the 3 alignment squares though.

1,121 thoughts on “QR Code and 2D Code Generator”

  1. I tried to generate a QR code to direct people to my website, i put in all the information and it went to a black screen and that was it. I was waiting for the code to appear so I can save it and start using it, am I doing something wrong?

  2. I am also looking for a site similar to Microsoft’s codes where you can place a site name (our customer), show the long URL, show the shortened URL (we use goo.gl and we are very pleased with their program), and then track how many people click on the QR code and then go to the intended long URL via the shortened one.

    Seems simple, but not found.

    BTW, this site and your program rocks! Thanks!

    1. It is probably you. 😉

      I didn’t add any cpu intensive functions to it. But be aware that iOS 4.3.1 has a serious memory leaking problem and Qrafter’s memory usage can increase in time unless they correct this issue. On iOS 4.2.1 no such problem exists.

  3. There is also the benefit of not looking suspicious. 🙂 I do worry about unexpected re-direction, this is usually not a good sign.

    Of course, anyone who complains the link could suddenly lead to the wrong place seems unaware it’s their own bloody site, they can make reality fit the code. 🙂

    By the way, any progress on those labels in iCalendar QRs we discussed ? Been labelling a dozen by hand so far 🙂

    Fingers

  4. Ok. Now all I have to do is figure out the URL for a Facebook check-in. If you happen to know how to do that let me know. Meanwhile, thanks for the Foursquare info. I’m not into that (yet) but might be soon. Thanks again.

    Any thoughts of an iPad version of Qrafter (asked the man with the new iPad 2)?

    1. I don’t think Facebook app has external calling for Places yet.

      Somebody reviewed Qrafter with iPad 2 and said it worked perfectly. So you can already use it as a big iPhone. 🙂 If and when I get an iPad, I can update Qrafter to utilize the big screen, but I cannot do it at the moment, not only with the iPad simulator.

  5. That’s OK. I was thinking it would be that way. It makes sense.

    How about this: can we make a code so a person can “check in” at a location? That is, a guy goes to a store, they have a code printed up, he scans it and it shows on his Facebook page “I’m at Joe’s Coffee House?”

  6. The twitter profile overlay option is very interesting, are there any plans to do something similar for regular URLs? Perhaps with a blank frame in the center so that we could insert an image afterwards?

  7. Hi. I have this bit of html code from one of Facebook’s developer pages:

    When the page loads you get a Facebook “Like” button and a message telling you how many people “like” the Facebook entity in question (here, my local car repair place). You can click the “Like” button and it works the way it should. My goal is to put the whole thing in a QR code, including the click of the “Like” button. Is there a way to do that? The “like” script is hosted on facebook.com, and I don’t think I have access to it.

    Actually, there may be an easier way. I should restate the question. It boils down to “Can I make a QR code that, when scanned, will ‘Like’ someone or something on Facebook?”

    1. Short answer, no.

      The QR Code can only be linked to a mobile page that has a like button on it. The user has to actually click on the like button. All other cases are seen as spam by Facebook and in the best case you’ll be blocked or banned from Facebook, in the worst case, you’ll get into legal trouble with them.

  8. Thanks for this handy generator. I’ve enjoyed using it, and have promoted it in several blog posts I’ve written about QR Codes. 😉

    Sheri

  9. Thank you for this very informative article. I especially liked the bit about the use of URL shorteners. I think that it’s best to just use your original URL, rather than shorten it. This way people would have an idea that it’s from you and not some malware.

  10. Hello Kerem,

    I am playing with your generator – it seems to be great.
    Found it 2 hrs ago.
    Is there a possibility to download the generator and use it offline ?

    Thank you very much for your help and the hours of work you spend for developing it.

    Greetings from Germany

  11. Hi again Kerem- I have a laymen question. A company we send ads to has decided to only use Microsoft Tag because they’re worried that “some of QR code generator companies may go out of business.” I don’t know enough about the code to know if this could be a problem. Just because a company/coder isn’t around would that make the QR Code not work? (This company also decided to use Bing maps exclusively so this may just be them moving all their business to one company.)

    1. Hi Jul,

      If you are using a generator that shortens URL with its own domain, yes that may be at risk. With my generator, you are only shortening URLs with very known companies like bit.ly or goo.gl and, if you don’t shorten your URLs, then the QR Code will be valid forever. The difference with QR Codes and Microsoft Tag is, you can create standalone QR Codes that will be valid forever, but you can’t do the same with Microsoft Tag.

  12. Hi again. Any ideas on which tiny url format is better? I went with Tiny URL just because I’ve seen it around. I have a Google analytics account, so would I be better off doing the goo.gl short URL?

    Also, I left the error correction level to low, as you mentioned. What would be the benefits/drawbacks of increasing the error correction? I just want to make sure as many readers/phones as possible are able to read the codes.

    Thanks!
    Dan

    1. bit.ly and goo.gl are better as you can track your codes with them.

      If you will leave the code untouched (like adding images on top of it, distorting it, etc), you don’t need high error correction.

  13. I ran into a problem: I used your generator to make a Browse to Website code for my blog (christianboyce.blogspot.com). Blogspot includes an option for a “mobile device” layout, which I have taken advantage of. I think they check the device before loading the page and if it’s a phone they load using a smaller template. Anyhow, if I scan and open using Safari, it opens fine. If I scan using Scan and Go, I get this message:

    Cannot Open Page
    The operation couldn’t be completed. (NSURLErrorDomain error -999).

    When I dismiss the error by touching OK on my iPhone the page loads anyway. If I close the page, and go back to the URL and the list of Actions: Go to URL, Open URL in Safari, etc. I can touch Open URL in Safari and it opens fine, but Go to URL gives me the error again.

    The code is being read perfectly but the Go to URL is not working right. I do think that I broke it myself, by turning on the Mobile Device layout option. But, can you help me?

  14. Okay, I give up…..

    `You can fetch and encode the latest tweet of a Twitter user“

    I understand what it does, I do not understand why anyone would want to ?

    Fingers

    1. The generator is developed mostly on user feedback and that was a feedback. People can need different things, you know. 🙂

      1. Cool. Still can’t figure it out tho. By the time you finish typing the username, the guy could have tweeted something else. Oh well, can’t complain if you fulfill my insane requirements 🙂 But I would like to just understand why 🙂
        Are the messages asking for it still around ?

  15. Cool. 🙂

    I’ll just have 200-some events in an SQL database, and QR generations could be fun directly from the database… or in any way that did not involve re-entering data 🙂 But it’s a minor thing. It could too easily lead to having some many codes we can’t find anything 🙂 Oh well…

    Fingers.

  16. Hi….

    Any progress on Labeliing Codes ? 🙂 Just checking if you were inspired.

    Could you recommend a way to create a bunch (couple of hundreds) ical QR codes from an access, sql or excel source ?

    Fingers

    1. Not yet, but I’ll try to do it when I have some time.

      You would have to write your own script for creating multiple codes from a source. I’ll also add that to the generator in the future.

  17. The EPS is not in the correct format. What to do? It is not fully transparent but has a layer above black that cannot be deleted without losing information…

  18. To make the background truly transparent in Adobe Illustrator:
    download the .EPS version of the QR code. Open it in Illustrator. Select All. Either via the palette or Effects menu, choose Pathfinder –> Divide. Direct select any of the background. Use the menu Select –> Same… –> Fill & stroke. Delete. Select All. Group.

    You’re good to go.

Leave a Reply

Your email address will not be published. Required fields are marked *