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 strongly 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 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. 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 3609664 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 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 for some time, you can contact me from the email address on my contact page.


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 no scanner (yes, none of them) for any platform except Qrafter and Qrafter Pro for iPhone and iPad follows 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: *
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:
E-Mail Address:
Mobile Phone:
Video Call Phone:
Work Phone:
Work Fax:
Home Phone:
Work Address: Street:
ZIP Code:
Home Address: Street:
ZIP Code:
Address: Street:
ZIP Code:
Work Web Address:
Home Web Address:
Web Address:
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: *
Network Type:
URL Shortening:
(will use full url in case of error)
Error Correction Level:
(only for regular QR Code)
Block Size in Pixels:
Margin Size in Blocks:
Output Type:
Foreground Color: Transparent
Background Color: Transparent

Download on the App Store


You can follow me on Twitter through @kerem_erkan. This generator shares a Facebook page with Qrafter and Qrafter Pro since March 2011. You can like that page using the “Like” button above, or you can go to the Facebook page using this link. You can also tweet about this page by clicking this link.

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 j.mp (alternative name for 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 Google Maps URLs.
  • You can create Bing Maps URLs.
  • You can create raw geological coordinates.
  • 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 initiate a chat to a particular Blackberry PIN on Blackberry Messenger.
  • 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. 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.

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.

And lastly, it seems like anything added to this generator is being followed a lot by other generator makers (I am looking at you Avivo) without giving any credit. I hope they also follow the necessary standards properly. 😉

QR Code Scanners:

The best scanner apps for iPhone and iPad are Qrafter and Qrafter Pro (why two versions?). They are available on the App Store. They are designed for both iPhone and iPad and Qrafter is free (scanning is free and you can unlock Pro generation features via an in app purchase) while Qrafter Pro is $2.99. 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. You can also visit Qrafter and Qrafter Pro’s Facebook Page here.

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

For BlackBerry, QR Code Scanner Pro is a good choice according to Josh West, one of the commenters on this page.

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.

You can also check out http://QRmediaGuide.com for a list of other scanners.

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


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 inclde 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 to 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: While I am working on a tracking platform, you can’t track the 2D Codes you create on this generator unless you create your own trackable goo.gl or 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.

  • Eloktavian
    #757 written by Eloktavian 5 years ago

    Someone have script php?
    Need one 🙁

  • Simon
    #758 written by Simon 5 years ago

    Excellent work, and well done for upholding the standards so properly. Would you consider providing an API, so with PHP & cURL I could post the required parameters and receive a code by return?

  • Don Rogers
    #760 written by Don Rogers 5 years ago

    I have shortened the link in bit.ly not sure how you track they have to go to the site to start with but where does the tracking show up

    • Kerem
      #761 written by Kerem 5 years ago

      You need to shorten the URL using bit.ly pro. You’ll need to create an account on bitly.com for that first. After creating the account and logging in, create your bit.ly URL there, paste it to the generator and create your QR Code. You can then track visits from bit.ly dashboard.

  • Marco
    #762 written by Marco 5 years ago

    Hi, if I generate a ULR QR code, does it encode the actual URL or is it a re-direct which is hosted on some site? Thanks

    • Kerem
      #763 written by Kerem 5 years ago

      The actual URL is encoded. Both this generator and Qrafter, QR Code Reader and Generator for iOS respect your privacy.

  • Joey Hauschildt
    #764 written by Joey Hauschildt 5 years ago

    How does a format that is readable by anybody respect your privacy? Why would you want a tool designed to distribute information to conceal it anyway? Did I miss something in that last comment?

    • Kerem
      #765 written by Kerem 5 years ago

      Yes, probably you missed my point. While the format is open, some generators and reader apps harvest information that is entered or scanned. For example, you can see that some reader apps direct you first through their servers to record which URL you are going to. Unlike them, Qrafter sends you directly to the URL that is encoded into the QR Code. That’s your privacy and it should be respected in my humble opinion.

  • Joey Hauschildt
    #766 written by Joey Hauschildt 5 years ago

    That makes sense. And I totally agree.
    BTW: Thank you for this awesome tool.

  • Simon
    #768 written by Simon 5 years ago

    Do QR codes created expire?

    You’ve created a great tool!

  • Sheila Hoffman
    #770 written by Sheila Hoffman 5 years ago

    Just trying QR for the first time for a client. Glad I found your tool. Can you tell me why I keep getting a semi-colon after the business name on a vCard? I’m not putting it there. I’ve tried both with and without the Escape Special characters checked. Is there something we can do to avoid it? Thanks!

    • Kerem
      #771 written by Kerem 5 years ago

      Your reader app is unable to parse vCards correctly. That’s why it cannot parse that semicolon. You need to try a different reader.

  • Sheila Hoffman
    #772 written by Sheila Hoffman 5 years ago

    I didn’t ADD the semicolon and it’s not putting one there anywhere else! So are you saying that every line actually gets a semicolon to indicate line breaks, but my reader is managing them all correctly EXCEPT for this one? My client is seeing the same thing. The reader on my Android phone has parsed every other code I’ve scan correctly. I think it’s the one that comes with my Galaxy S phone. But the client has an entirely different phone and app and has the same issue. I see that you offer an app however it’s for iPhones only. Obviously if it’s the way my app scans then it’s going to be different for everyone and there’s no way to control that.

    • Kerem
      #773 written by Kerem 5 years ago

      I know you didn’t add it. vCard spec states that organization line should be like this:

      ORG:Organization name;Department name

      See that semi-colon? If you don’t fill out department (and the generator does not have a field for it currently) the ORG: line becomes this:

      ORG:Organization name;

      Most reader apps expect the ORG: line to include the organization name only (which is completely wrong), that’s why they never bother to parse that semi-colon between the organization and department names.

      Hope this helps.

  • Sheila Hoffman
    #774 written by Sheila Hoffman 5 years ago

    Thanks! So since the generator doesn’t have a field for Department it appears there’s really no way to avoid this unless we leave off Organization entirely! Or am I missing the work-around? I hear “get a better scanner” but I can get everyone who uses a scanner to do that!

  • Sheila Hoffman
    #775 written by Sheila Hoffman 5 years ago

    If I could, I’d delete my last post. I just figured out that by changing the Organization to be empty and moving the company name to the Title field, it appears correctly! Hope that helps someone else. I’m good-to-go. Thanks!

    • Kerem
      #776 written by Kerem 5 years ago

      Hi Sheila,

      While it will look good, the company info will be entered into the wrong place. I decided to change the organization field so that other scanners can understand it. This is not the solution to the real problem though.

  • Amber
    #777 written by Amber 4 years ago

    Thank you for the wonderful tool! I’ve recommended it to every designer that I work with! THANK YOU!

  • carlos
    #779 written by carlos 4 years ago

    hi, how can i make a Follow me on twitter, using qr codes ???

    • Kerem
      #780 written by Kerem 4 years ago

      You can create a Twitter URL for your username so that your Twitter page opens when the code is scanned.

      • Nwora Fairley
        #781 written by Nwora Fairley 4 years ago

        Do you do this within your twitter account? If so where is that option located at?

        • Nwora Fairley
          #782 written by Nwora Fairley 4 years ago

          Never mind figured it out. Thought it was some magical tech way of doing something, but I already use the URL for my Twitter page. Duh

  • Nwora Fairley
    #783 written by Nwora Fairley 4 years ago

    What’s up Kerem? I’m kind of pissed that you are promoting QRazystuff.com, but they do not list your reader as one of the readers of choice. HOW DO YOU NOT LIST THE BEST DAMN READER OUT THERE!!!

    • Kerem
      #784 written by Kerem 4 years ago

      Thanks Nwora! Actually QRazyStuff does more than its share to promote Qrafter on Twitter or Facebook. They link to another site that recommends QR Codes, that’s why it looks like they don’t list Qrafter there. 🙂

  • hoyajin
    #785 written by hoyajin 4 years ago

    Hello Karem , i am new to QR world, there might be a solution to my query but i have not found it yet. I am looking for a way to take an image and a few lines of text and make a QR code out of it… Like an ID card…how would I be able to do this, so that when the QR code is scanned the text and the Image are shown with out redirecting or with out having to download the image separately.

    I would love some suggestions.

    • Kerem
      #786 written by Kerem 4 years ago

      Hi, QR Codes cannot contain more than a few KBs of data, so it is impossible to encode an image into one QR Code.

  • Qrcode
    #787 written by Qrcode 4 years ago

    Problem with most QR codes is that it’s like taking up to date technology backwards. If you ‘hardcode’ details into the QR code then print it, you lose most of the benefit of having the QR code at all.

    • Kerem
      #788 written by Kerem 4 years ago

      I don’t agree with your point. It’s the same with hardcoding the details onto a business card with letters and words. QR Code only lets you access that information without typing those letters. It’s merely a convenient shortcut.

  • mattdominy
    #789 written by mattdominy 4 years ago

    Hey Kerem, Thanks for this article. I want to generate a QR code for my business card. I want to link it to my website for now. However, I am thinking of making a YouTube video in the future. Is there a way to change where the QR directs people too later on or do you have to create a new one? If you create a QR code once, can you later on create a new one? Thanks in advance for your response.

    • Kerem
      #790 written by Kerem 4 years ago

      Matt, you can’t change the contents of a QR Code once created. You can however always create a new code.

  • mattdominy
    #791 written by mattdominy 4 years ago

    OK, thanks!

  • mattdominy
    #792 written by mattdominy 4 years ago

    OK, so I tried it and two questions. 1) I submitted it and it came on the screen. Is there way to save it to my computer so I can use it on my business cards? Also, my reader was not able to detect it even though it detected the one for your site just fine. any ideas what its not working?

    • Kerem
      #793 written by Kerem 4 years ago

      Just right click on the image to save it. I am not sure why your reader cannot recognize it though. Perhaps you can try another reader.

  • mattdominy
    #794 written by mattdominy 4 years ago

    re: saving it, thanks. re: reader, it is the same one I use on your site and it worked. My website is brand new and is built of a wordpress CMS. Is there any way it could be a website issue

    • Kerem
      #795 written by Kerem 4 years ago

      I did not understand. Are you using another generator? It may not be generating the code contents properly.

  • You may use these HTML tags: <a> <abbr> <acronym> <b> <blockquote> <cite> <code> <del> <em> <i> <q> <s> <strike> <strong>

  • Comment Feed for this Post
Go to Top