Skip to content

QR code generator

Links, text or Wi-Fi access. Download as PNG or SVG, with no watermark and no expiry.

Generated right here, in your browser. What you type never leaves your device.

This generator builds the QR code directly in your browser. The link, the text and your Wi-Fi password never reach a server — which matters, because a Wi-Fi QR code carries the password in the clear inside the image itself.

The code never expires and does not redirect through an intermediary domain. Many "free" generators actually produce a short link pointing at their own server, so they can count scans or start charging later; if that service shuts down, your printed posters stop working. Here the content is encoded inside the QR code itself.

Manual

How to use it

  1. 1

    Pick what to encode

    Use the "Text or link" tab for a URL or free text, or the "Wi-Fi" tab to produce a code that joins a phone to your network when scanned.

  2. 2

    Set the error correction level

    Higher levels survive smudges, creases or a logo on top, but pack in more modules. Medium (15%) is fine for screens; high or highest suits printing on surfaces that get dirty.

  3. 3

    Adjust size, margin and colour

    Keep at least 4 modules of margin — that is what the standard requires for a scanner to find the code. Modules must be darker than the background, never the other way round.

  4. 4

    Download as PNG or SVG

    PNG for screens and messaging. SVG for print: being vector, it scales to any size without the edges going soft.

In depth

Things worth keeping in mind

Which error correction level to use

Error correction decides what percentage of the code can be damaged and still read. The trade-off is that a higher level needs more modules, so the pattern gets finer at the same printed size.

  • Low (7%): screen-only codes carrying a lot of content.
  • Medium (15%): the sensible default for almost everything.
  • High (25%): printing on labels, packaging or surfaces that get scuffed.
  • Highest (30%): required if you are placing a logo over the centre of the code.

Minimum size when printing

The industry rule of thumb is the 1:10 ratio: a code scanned from 1 metre away should be at least 10 cm across. On a label read from 20 cm, 2 cm is enough.

If the code goes on a curved surface such as a bottle, add extra margin and raise the error correction — the curve distorts the modules at the edges.

History

From a Japanese assembly line to a restaurant table

The QR code was developed in 1994 by a team led by Masahiro Hara at Denso Wave, a subsidiary of the car-parts maker Denso. The problem was a factory problem: parts were labelled with barcodes, each one held a handful of characters, and workers were scanning as many as ten labels per box. They needed a code that fitted in the same space and carried a hundred times more.

The three corner squares came, as Hara has told it, from staring at a Go board over lunch. He needed a pattern a scanner could find instantly and that would almost never turn up by accident on a printed page; the team measured the black-and-white ratios across a large pile of printed material and picked the 1:1:3:1:1 sequence because it was the rarest one there.

Denso Wave patented the format and then chose not to enforce the patent against anyone using it. That decision is why the thing is everywhere: anybody can generate and read QR codes without paying a licence. Mass adoption still took twenty-five years, and it arrived when phone cameras began reading codes without a separate app and the pandemic turned restaurant menus into a printed square overnight.

1994
The year Denso Wave published the format, in Japan.
7,089
Numeric digits that fit in a single code, at version 40 — the largest one.
21 × 21
Modules in a version 1 code. Each version adds 4 per side, up to 177 × 177.
How it works

How a QR code works inside

A QR code is not a picture that some server translates back into text: it is the text itself, written in binary across a grid. Each cell — a "module" — is one bit. Dark is 1, light is 0. That is why the code works offline, and why it cannot expire: it does not point anywhere, it already holds the message.

The three squares in the corners are the finder patterns. They are there because any line crossing one of them, at any angle, meets the same run of dark and light: 1:1:3:1:1. That signature almost never occurs by chance in the rest of the pattern, so the scanner uses it to locate the code, measure its size and work out its rotation before reading a single bit of data.

Running between the finders is an alternating line of modules, the timing pattern, which tells the scanner exactly where each row and column falls when the photo is skewed or the surface is curved. Beside the finders sit reserved bits holding the error correction level and which mask was applied.

The data is not written in straight lines. It snakes up and down in two-module-wide columns, starting at the bottom right and stepping around everything already placed. Then a mask is applied: a regular pattern of modules gets inverted to break up large blocks of one colour, which would otherwise confuse the scanner. The standard defines eight masks, and a generator tries all eight and keeps whichever scores the lowest visual penalty.

By hand

Drawing a QR code by hand

It can be done, with graph paper and patience. A version 1 code is 21×21 cells. Only one step genuinely hurts, and it is worth knowing which.

  1. 1

    That is version 1, the smallest size. Leave a 4-cell blank margin all around: it is part of the code, not decoration, and without it many scanners will not even try.

  2. 2

    A 7×7 black square holding a white ring and a 3×3 black centre, in the top-left, top-right and bottom-left corners. Leave one blank row and column between each one and the inside of the grid.

  3. 3

    On row 6 and column 6 (counting from 0), fill the cells alternating black and white between the finder patterns. They start and end on black.

  4. 4

    Always blacken the cell directly above and to the right of the bottom-left finder. Leave blank, for now, the 15 cells beside the finders where the format information will go.

  5. 5

    Start with the mode indicator: 0001 for digits only, 0010 for alphanumeric, 0100 for ordinary text. Follow it with the length in 8 bits, then each character as its 8-bit ASCII code. Pad out the block with 11101100 00010001 repeating.

  6. 6

    Here is the wall: these are Reed-Solomon codes, which means dividing polynomials over a finite field of 256 elements. By hand it takes a log and an antilog table, and version 1 at medium correction needs 10 bytes out of 10 rounds of arithmetic. This is the part almost everyone copies from a prepared table.

  7. 7

    From the bottom-right corner, in columns two modules wide, working upwards. At the top, shift two columns left and work down. Skip any cell already taken by a pattern.

  8. 8

    Pick one of the eight formulas — mask 0 is (row + column) mod 2 — and invert every data cell that satisfies it. Finally fill the 15 format cells with the correction level and the mask number you used.

Trivia

Things worth knowing

It was invented to count car parts

Masahiro Hara created it in 1994 at Denso Wave, a subsidiary of the parts maker Denso. The barcodes of the day held around 20 characters and had to be scanned one label at a time; on the factory floor a single box could need ten separate scans.

Its owner chose not to charge for it

Denso Wave patented the format but announced it would not exercise its rights. That decision is why QR beat the other two-dimensional codes of the nineties, which did charge for licences.

The magic ratio is 1:1:3:1:1

It is the run of dark and light that any line meets when it crosses one of the three big squares, from whatever direction. Because that signature almost never happens by accident, a scanner can find the code in milliseconds and at any angle.

The same maths as deep-space probes

Error correction uses Reed-Solomon codes, the same family that protects the data on a CD and the transmissions from the Voyager probes. It is what lets a code with up to 30% of its surface destroyed still read in full.

The biggest one holds 7,089 digits

Version 40 measures 177×177 modules and stores 7,089 digits, 4,296 alphanumeric characters or 2,953 bytes. Nobody gets there in practice: long before that the pattern is too fine for a phone camera to resolve.

Questions

Frequently asked questions

Do the codes from this tool expire?

No. The content is encoded inside the image itself, not in a link back to this site. The code keeps working even if ferra.tools disappears.

Can I use the codes commercially?

Yes. No watermark, no required attribution and no quantity limit. Use them on products, signage or printed material.

Is it safe to put a Wi-Fi password in a QR code?

The code contains the password in plain text: anyone who scans the image can read it. That is convenient for a guest network at home or in a venue, but do not publish the QR code online or leave it visible from the street.

Why does my code scan badly?

The three usual causes are: not enough margin around the code, too little contrast between modules and background, or a printed size too small for the reading distance. As a rule, the side of the code should be at least one tenth of the distance it will be scanned from.

What is the difference between PNG and SVG?

PNG is a pixel image at a fixed size. SVG describes the code as vector shapes, so it can be blown up to poster size without losing sharpness. For print, always use SVG.

How much text fits in a QR code?

The theoretical maximum is around 4,296 alphanumeric characters at the lowest error correction, but well before that limit the code becomes so dense that phones struggle with it. For long links, shorten the URL before generating.

Related tools

Updated