How to create QRcode

last update: 2007-2-4

CAUTION: This document contains strange or wrong English because I'm poor at English. You should confirm standards as needed.


0. Introduction

For some reason I thought to convert code39 barcode to QRcode in a web system. However, specifications of barcode were on Internet, we could get no specification of QRcode in 2000. (Now we can see a Japanese specification for QRcode in JISC.) So I think it is useful "how to encode QRcode" for following implementers ,and I wrote this document.

QRcode is developed by DENSO Corporation. It is standardized by JIS and ISO.
This document is based on JIS X 0510(1999).
If you want to know more detail,you should see theses standards.

1. What is QRcode?

QRcode is two dimensional code which is categorized in matrix code.
Sample image of QRcode is below.
sample image for QRcode

Features of QRcode are

1.1 Model of QRcode

QRcode model1:Original model.
QRcode model2:Extended model.

In recently model2 is generally used . And this document is described only QRcode model2.

1.2 Characters which can be encoded in QRcode.(encode mode)

1.3 Error correcting in QRcode.

QRcode has a function of an error correcting for miss reading that white is black.
Error correcting is defined in 4 level as below.

1.4 Version in QRcode.

Size of QRcode is defined as version.
Version is from 1 to 40.
Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases.
So version 40 is 177*177 matrix.

1.5 Structure of QRcode symbol.

The below figure is a structure of QRcode model2 version 1. In the below figure,white or black parts are fixed in specification. They are "finder pattern" and "timing pattern".
"Finder pattern" is used to help detection a position of QRcode in decoder application.
"Timing pattern" is used to help determine a symbol's coordinate in decoder application.

In yellow color parts,encoded data (including error correct code) are stored.
And in cyan color parts,information of error correcting level and mask pattern(described later) are stored.This is called format information

figure of qrcode structure

encoded data (including error correct code)
format information

In addition, version2 or higher has "alignment pattern" which is used to correct skewness in decoder application.
And version 7 or higher has "version information" which has information of version itself.


next page : How to encode - Capacity. Encoding to data code words.

[1] [2] [3] [4] [5] [6] [7]   next page