What is a QR code generator?
A QR code generator turns text — usually a web link — into a square barcode that a phone camera can read in a second. The black and white squares encode the text, so instead of typing a long address, someone points their camera at the code and the phone opens the link, shows the text, or joins the Wi-Fi network. The code on this page is made entirely in your browser: nothing you type is sent to a server.
QR codes show up everywhere now because they remove typing. Restaurants print them on tables instead of paper menus. Shops stick them on counters for payments. Event tickets, business cards, product boxes, and posters all use them. A code that links to a website is the most common kind, but the same squares can hold a phone number, an email address, a short message, or Wi-Fi login details. A QR code that points to a very long address is easier to scan when the address is short first — a URL shortener makes the compact link you can encode.
This generator gives you control over the two things that matter most: how much damage the code can survive, and how big the image is. The error correction level decides how much of the code can be scratched, smudged, or covered before it stops scanning. The size setting decides how large the downloaded image is, so it stays sharp whether it goes on a business card or a poster.
How a QR code generator works
A QR code is a grid of dark and light squares called modules. The smallest codes, version 1, are 21 modules on each side. Each higher version adds 4 modules per side, so version 2 is 25 × 25, version 3 is 29 × 29, and version 40 is 177 × 177. Longer text needs a bigger grid, because every character has to fit inside the squares.
The generator picks the smallest version that holds your text at the level you chose. The address https://sortrun.com has 19 characters, and at medium error correction that needs version 2, a 25 × 25 grid. The word Hi at low error correction needs only version 1, a 21 × 21 grid. A 43-character message at medium correction needs version 4, a 33 × 33 grid. The version shown on this page is an estimate based on the byte-mode capacity of each version, checked against the same library that draws the code.
Error correction works by adding spare data to the code. At level M, about 15 percent of the code can be damaged and it still scans, because the reader rebuilds the missing squares from the spare data. Higher levels add more spare data, which is why the same text needs a bigger version at level H than at level L. The formula behind the grid is simple: grid size = 17 + 4 × version modules.
Error correction levels explained
Level L, low, allows about 7 percent damage. It makes the smallest codes, so it is the right choice when the code will be printed cleanly and scanned in good light — a link on a screen, for example. Level M, medium, allows about 15 percent damage and is the default here, because it is the best balance of size and toughness for most uses.
Level Q, quartile, allows about 25 percent damage. Pick it when the code will be printed on something that gets handled a lot, like a product label or a flyer that gets folded. Level H, high, allows about 30 percent damage and is the choice for codes printed on curved surfaces, outdoor signs, or anything that will be scratched. The price of a higher level is a bigger grid: the same text that fits version 2 at level M may need version 3 or 4 at level H.
One practical rule: if you plan to put a logo in the middle of the code, use level H. The logo covers part of the grid, and the high error correction rebuilds the covered squares. With level L or M, a logo in the middle often kills the code. Test the printed code with two different phones before you print a thousand copies — a code that scans on one phone and not another is usually a contrast or size problem, not a data problem.
A worked example: a QR code for your homepage
Take the address https://sortrun.com. It has 19 characters. At medium error correction, version 1 holds only 14 characters, so the generator steps up to version 2, which holds 26. The result is a 25 × 25 grid — 625 modules in total — and at the default size of 256 pixels each module is about 10 pixels wide, which is plenty for a phone camera to read.
Now try the shortest useful input: the word Hi. That is 2 characters, and at low error correction version 1 holds 17, so the code is version 1, a 21 × 21 grid of 441 modules. At 256 pixels wide, each module is about 12 pixels. Short text makes small, clean codes that scan fast even from a distance.
A longer message shows how the version climbs. A 43-character message at medium correction does not fit version 3, which holds 42 characters in this library, so it becomes version 4, a 33 × 33 grid. If you keep typing past 213 characters at medium correction, the estimate passes version 10 and the tool reports version 10+, because very long codes are slow to scan and better split across a short link instead. If your link is long, run it through our URL encoder decoder first to check the characters are safe, then paste the clean link here.
Why QR codes still matter
QR codes survived because they solve a real problem: getting a phone from the physical world to a digital one without typing. A poster with a web address gets almost no visits, because nobody types a long address from a poster. The same poster with a QR code gets visits, because scanning takes one second and typing takes thirty.
Small businesses use them for payments, menus, and feedback forms. Teachers use them to link worksheets to videos. Event organisers put them on tickets so the door check is a scan instead of a list. Marketers print them on packaging so a buyer can reach the manual, the warranty page, or a reorder link. In each case the code is a bridge, and the value is in what it points to, not in the squares themselves.
The codes also work offline in the sense that nothing about the code itself needs the internet: the squares are just data. The phone needs a connection only to open the link inside. That is why codes holding Wi-Fi passwords or plain text work even with no signal at all.
QR code generator vs a plain link
A QR code and a plain link do the same job — they both point at a web address — but they work in different places. A link works on a screen, where someone can click or tap it. A QR code works on paper, on a wall, on a product, or on another screen, where there is nothing to click. If your audience is already looking at a screen, a link is better. If they are looking at the real world, a code is better.
Codes have one weakness links do not: you cannot see where they go. That is why codes from strangers deserve a pause — a phone shows the address before opening it, so check it. For your own codes, the fix is simple: use a short, readable address that people recognise, and test the code yourself before printing it. A long address with tracking parameters still works, but it makes a denser code that needs a bigger print size to scan well.
Codes also pair well with other image tools. If the downloaded code needs to sit inside a larger design, our image resizer can shrink it to the exact width your layout needs, and our image compressor can slim down the photo it sits next to. Keep the code itself as PNG or SVG, though — lossy formats blur the sharp edges a scanner needs.
Common mistakes when making QR codes
The most common mistake is cramming too much text into one code. A code holding a 500-character paragraph is dense, slow to scan, and needs to be printed large. If the content is long, put it on a web page and encode the short link instead. Short input makes a clean code that scans from further away.
The second mistake is low contrast. QR codes need dark squares on a light background. A light grey code on a white background, or a coloured code on a busy photo, fails on many phones. Black on white scans best. If you must use colour, keep the squares dark and the background pale, and test it on two phones in daylight.
The third mistake is printing too small. A code that is 2 cm wide on a business card works only if the text is short and the print is sharp. As a rule, print at least 2 × 2 cm for a short link, and larger for longer ones. The fourth mistake is skipping the test: always scan the printed copy, not just the screen, because print sharpness and paper glare change the result. And never generate a code for a password you reuse elsewhere — a password generator makes a fresh one for each account instead.
How to use this QR code generator
First, type or paste your text or link into the box. The default is https://sortrun.com, so you can press the button straight away to see a working code. Next, pick an error correction level. Medium is right for most uses; pick High if the code will be printed outdoors or handled roughly, and Low if you want the smallest possible code for a clean screen.
Then set the image size. The default of 256 pixels suits screens and small prints. For a poster, raise it toward 1024 pixels so the edges stay sharp when enlarged. Press Generate QR Code and the code appears below, with buttons to download it as SVG or PNG. SVG stays sharp at any size and is best for print; PNG is best for documents, chats, and anywhere an image file is expected.
Your text never leaves your device. The code is drawn in your browser by a small library stored on this site, so it works offline once the page has loaded and no one else sees what you encoded. If the code will go on something public, scan it once with your own phone before you print it — that one check catches almost every mistake.