Skip to content

QR Code Generator

Turn a DOI, a web address or any text into a QR code for a poster, a slide or a handout: choose the error-correction level and the colours, then download an SVG for print or a PNG. A DOI becomes a full https://doi.org/ link, so any phone camera opens the paper.

What should the code hold?

Paste a DOI as 10.xxxx/…, doi:10.xxxx/… or a doi.org link. The code holds the full https://doi.org/ link, so any phone camera opens the article.

DOIs and the doi.org address are case-insensitive, so the link still works — and capitals fit QR's compact alphanumeric mode.

The code holds: https://doi.org/10.1038/171737a0

How much of the code can be dirty, torn or covered and still read. A higher level makes a bigger code for the same data.

The light border around the code. The standard asks for 4.

Your QR code

Test the printed size with two or three phones before it goes on a poster or a slide.

What is inside

3 — 29 × 29 modules

Version

Byte (UTF-8)

Encoding mode

Q

Error correction

268 of 272

Data bits used

2 × 18 correction codewords

Reed–Solomon blocks

4

Mask

Raised from M to Q at no cost: the data still fits the same version.

Mask penalties

MaskPenalty
01,348
11,500
21,585
31,451
4chosen1,306
51,564
61,328
71,528

Each of the eight masks is scored for patterns that confuse scanners — long runs of one colour, 2 × 2 blocks, finder-like stripes and dark/light imbalance. The lowest score wins.

How to Use the QR Code Generator

  1. 1. Choose what the code holds. A DOI — pasted bare, with doi: or as a doi.org link — a web address, or plain text. The line under the box shows exactly what goes into the code.
  2. 2. Pick an error-correction level. M suits screens and handouts. Choose Q or H for print that may get scuffed or folded, or if something will cover part of the code.
  3. 3. Set the look. Keep the quiet zone at 4 modules and the modules darker than the background; the tool warns about low contrast and inverted colours. Choose a PNG size for slides, or download the SVG, which scales to any size for print.
  4. 4. Test before you print. Scan the code with two or three different phones, at the size and distance people will meet it.

How a QR Code Is Built

A QR code stores data in a square of dark and light modules, from version 1 (21 × 21 modules) to version 40 (177 × 177), following the international standard ISO/IEC 18004. The generator goes through the same steps every scanner expects:

  • Mode. Digits alone use numeric mode (about 3.3 bits a digit); capitals, digits, the space and $ % * + - . / : use alphanumeric mode (5.5 bits a character); everything else is stored as UTF-8 bytes (8 bits each).
  • Version. The smallest version whose capacity at the chosen error-correction level holds the data.
  • Error correction. The data is split into blocks, and Reed–Solomon check codewords are added to each so that a damaged code still reads: about 7% of the codewords can be restored at level L, 15% at M, 25% at Q and 30% at H. When a higher level fits the same version, the tool raises the level for free.
  • Mask. One of eight patterns is laid over the data to break up shapes that confuse scanners. Each is scored for long runs of one colour, 2 × 2 blocks, finder-like stripes and dark–light balance, and the lowest score wins — the tool lists all eight.

Worked example: a DOI in capitals

The sample DOI, 10.1038/171737a0 — Watson and Crick's 1953 paper on the structure of DNA — becomes the 32-character link https://doi.org/10.1038/171737a0. Lower-case letters need byte mode: 4 bits for the mode, 8 for the length and 32 × 8 for the data, 268 bits in all. At level M, version 2 holds 224 data bits and version 3 holds 352, so the code is version 3, 29 × 29 modules — and since 268 bits also fit version 3 at level Q (272 bits), the generator raises the level to Q at no cost.

DOIs and the doi.org address are case-insensitive, so the same link in capitals still works, and capitals fit alphanumeric mode: 4 + 9 + 16 × 11 = 189 bits. That fits version 2 at level M — a 25 × 25 code whose modules are larger at the same printed size, and easier to scan from a distance. Tick Write the link in capitals to compare.

QR Codes in Research and Teaching

  • Posters. Put a code to the paper, preprint or data set in a corner where people can reach it, with the DOI printed beside it for anyone who cannot scan. A common rule of thumb makes the code at least a tenth as wide as the distance it will be scanned from.
  • Slides. Put the code on your last slide and leave it up during questions, so the audience has time to scan it.
  • Handouts and theses. A DOI link keeps working when a publisher moves an article, which an ordinary web address may not.
  • References. A QR code is a shortcut, not a citation: keep the full reference with its DOI in your reference list as usual.

Masahiro Hara of the Japanese company Denso Wave invented the QR code in 1994 to label car parts, and it became an international standard, ISO/IEC 18004, in 2000. This encoder is a port of Project Nayuki's open-source QR Code generator library (MIT licence), and it runs entirely in your browser. QR Code is a registered trademark of DENSO WAVE INCORPORATED.

Are QR Codes Secure?

A QR code is not encryption: anyone with a phone can read it, and it holds exactly the text the tool shows, with no tracking or redirect in between. The risk is on the scanning side — a sticker pasted over a real code can send people to a fake site, which is why phones show the address before opening it. Link to an address readers can recognise, such as doi.org or your university's domain, and print it beside the code.

Frequently Asked Questions

How do I make a QR code for a DOI?
Choose DOI and paste the identifier — 10.1038/171737a0, doi:10.1038/171737a0 or a doi.org link all work. The tool turns it into the full https://doi.org/ address, which any phone camera opens as a link, and offers to write it in capitals for a smaller code.
What error correction level should I use?
M, which restores about 15% of the codewords, suits screens, slides and clean printouts. Use Q (25%) or H (30%) for posters that will be handled or displayed outdoors, or if a logo will cover part of the code. A higher level makes the code denser for the same data.
What size should a QR code be on a poster?
Large enough for the distance: a common rule of thumb makes the code at least a tenth as wide as the scanning distance, so roughly 10 cm across to be scanned from a metre away. Fewer modules help too — keep the content short, use capitals for a DOI link — and always test the printed size.
Should I download the QR code as SVG or PNG?
SVG for print: it is a vector image, so it stays sharp at any size in a poster or a thesis. PNG for slides, documents and websites — choose a size at least as large as it will appear on screen. Both carry the colours and quiet zone you chose.
Do QR codes expire?
A code made here never expires: it holds the address itself, not a link to a tracking service. What can stop working is the address it points to. A DOI link is designed to keep resolving even when an article moves, which makes it a safer target than a page address.
Can I change the colours of a QR code?
Yes, as long as the contrast stays strong and the modules stay darker than the background. Many scanners cannot read light modules on a dark background, and pale colours fail in poor light. The tool warns when the contrast drops below 4:1 or the colours are inverted.

Related Tools

More in Data, Markup & Code

See all Data, Markup & Code