Browser-based image tool · text or link → PNG or SVG

QR Code Generator

Type a link or a short message, choose the colours, square or rounded modules and an optional logo for the middle, then save a PNG or an SVG. The code is drawn by script in this tab, and your logo is only read from your disk to draw it.

Content and style

Error correction
Level H can rebuild about 30% of the code if it is covered or damaged. Higher levels add modules.
Module style
Centre logo (optional)
PNG, JPG or WEBP, up to 25 MB

The logo sits on a white plate no wider than a quarter of the code, so it hides part of the pattern that error correction has to rebuild.

Applies to the PNG. The SVG scales to any size without blurring.

Your QR code

Type a link or some text to see the code.

This is a static code: the text itself is stored in the pattern, with no redirect in between. It never expires, but it also cannot be changed after printing. If the link might move, point the code at an address you control and can redirect.

Scan the saved file with at least one phone before you send it to print, at the size it will be printed.

QR Code Generator

Operator: Abdulla Al Fahad. How tools are built and checked

A QR code printed on a café table tent has one job: get a phone from the table to the menu page, in whatever light the room has. Most of what decides whether that works is settled before the code is printed. How long is the link? How much of the pattern is hidden behind a logo? How far apart are the two colours? And how big will the printed square be?

This generator puts those decisions in front of you. You type the link or text, and the preview shows the actual module grid, its version number and its size in modules as you type. You pick one of the four error-correction levels, set the two colours, choose square or rounded modules, drop a logo into the middle if you want one, and save a PNG between 256 and 2048 pixels wide or an SVG that scales without limit.

Key features

  • Text or link up to 1,000 characters, with a live character counter
  • Error correction L, M, Q or H, with H selected by default
  • Foreground and background colour pickers with a contrast-ratio warning below 4.5 to 1 and a separate warning for light-on-dark codes
  • Square or rounded modules, drawn the same way in the PNG and the SVG
  • Optional PNG, JPG or WEBP logo, centred on a white plate no wider than a quarter of the code
  • PNG output from 256 to 2048 pixels square, and an SVG written from the module matrix
  • Version and module count shown under the text box as you type

How the code grid is sized and drawn

A QR code is a square grid of dark and light modules. The smallest, version 1, is 21 × 21 modules, and each version up adds four modules per side, to 177 × 177 at version 40. The generator picks the smallest version that holds your text at the level you chose, and draws four light modules of margin around it, which the QR specification calls the quiet zone.

The PNG is drawn on a canvas. Each module's edges are snapped to whole pixels, so neighbouring modules meet cleanly even when the module width works out to a fraction of a pixel. The SVG is written from the same module matrix as one path element, plus a background rectangle. When a logo is added, the SVG carries it inside the file as an embedded PNG, so the file opens on its own without a second image beside it.

Rounded modules round only the corners that have no dark neighbour on either side. Two modules that touch stay joined along their shared edge, and the finder squares in three corners keep their solid shape with soft outer corners.

How it works

Your text goes to the qrcode library bundled with this page, which picks the encoding mode, the smallest version that fits and the best of the eight mask patterns, and returns the grid of modules as an array of ones and zeros. The page then lays that grid out at the size you picked: the image width is divided by the module count plus eight (four quiet-zone modules on each side), and each module's edges are rounded to the nearest pixel.

A logo is first redrawn upright on a small canvas, at most 512 pixels on its longer side, using the photo's EXIF rotation. Its plate is sized so that the logo plus a margin of about three quarters of a module on each side is at most 25% of the code's width, not counting the quiet zone. The same numbers place the plate in the PNG and in the SVG.

Typical uses

  • A café prints a code on each table that opens its menu page, with the café's round logo in the middle.
  • A wedding couple puts a code on the back of the invitation that links to the RSVP form, in the same dark green as the card's lettering.
  • A landlord tapes a code inside a holiday flat that holds the Wi-Fi network name and password as plain text in the Wi-Fi format phones recognise.
  • A designer needs an SVG of a code to place in a brochure layout, so it stays sharp at whatever size the page needs.
  • A teacher puts a black-and-white code on a worksheet that links to a short video. Level H lets the code tolerate some toner streaks or fading, but a test scan of one photocopied sheet is the way to know before copying the whole class set.

Building one

  1. Type or paste the link or text into the box. The counter shows how many of the 1,000 characters you have used.
  2. Leave error correction at H, or lower it if you are not adding a logo and want fewer modules.
  3. Pick the foreground and background colours and check that no contrast warning appears.
  4. Choose square or rounded modules.
  5. Optionally choose a logo file; it appears in the centre of the preview on a white plate.
  6. Set the PNG size with the slider, then click Download PNG or Download SVG.
  7. Scan the downloaded file with a phone before printing it.

Example

Text and settings

https://example.com, level H, foreground #1a3d6e, background #ffffff, rounded modules, square logo, PNG size 1024

What the generator produces

Version 3, 29 × 29 modules. With the quiet zone the grid is 37 modules wide, so each module is about 27.7 px in the 1024 px PNG. The symbol itself is about 803 px wide, which caps the logo plate at about 200 px. The colours have a contrast ratio of about 11 to 1, so no warning appears.

Tips for best results

  • Shorten the link before you make the code. Every character you remove can drop the code a version, which means fewer and larger modules at the same printed size.
  • Leave the level at H when you add a logo. The logo hides real data, and H is the level built to rebuild the most of it.
  • Keep the foreground dark and the background light. The warning under the colour pickers appears below a contrast ratio of 4.5 to 1, and an inverted code gets its own warning.
  • Download the SVG for anything that will be printed larger than a postcard. Its width and height are only a starting size: the modules are shapes, so a print shop can scale it to a poster without blurred edges. The PNG is fixed at the pixel size you chose on the slider.
  • Scan the saved file, not just the preview, with an ordinary phone camera at arm's length before you order a print run.

Things to check before you rely on it

A static code cannot be edited. The link is stored in the pattern itself, so if the page moves after the flyers are printed, every code points at the old address. If that might happen, encode an address on your own domain that you can redirect later.

Pale colours look stylish on screen and fail in a dim room. Light grey on white, yellow on white or mid-blue on dark blue can all fall well below a 4.5 to 1 contrast ratio, and a phone camera sees even less contrast than your monitor shows.

A logo at level L or M can make the code unreadable. At L the code can only rebuild about 7% of itself, and the plate behind the logo can hide close to that on its own. The tool warns you whenever a logo is set with any level below H.

Printing too small defeats a long link. A 1,000-character text at level H needs version 36, 161 modules across; printed 3 cm wide, each module is under 0.2 mm, which many phone cameras cannot resolve.

Non-Latin text uses more space. An accented letter or a character from many non-Latin scripts takes two to four bytes, so 1,000 such characters can be too much for level H even though the counter shows 1,000 or fewer. The tool says how many bytes the text needs when it will not fit.

The rounded style is softer on the eye, but it shrinks the dark area of isolated modules a little. On a small print with a pale foreground, square modules are the safer choice.

Common errors and how to fix them

The tool says the text needs more bytes than the largest QR code holds.
At level H a code holds up to 1,273 bytes. Shorten the text, remove tracking parameters from the link, or drop to level Q, M or L if you are not using a logo.
The text box stops accepting characters part-way through a paste.
The box takes up to 1,000 typed characters, and the counter turns amber at the limit. For longer content, such as a full set of instructions, put it on a web page and encode that page's link instead.
The logo appears as a small square photo with a background instead of just the mark.
A JPG has no transparency, so whatever surrounds the mark is drawn too. Use a PNG of the logo with a transparent background; the white plate behind it then shows through around the mark.
The PNG download fails at 2048 pixels.
Some phones limit canvas memory. Pick a smaller size, or download the SVG, which does not depend on a pixel size.

Best practices

  • Encode a link you control, so the destination can change without reprinting.
  • Print the code at least 2 cm wide for a scan from close up, and larger for posters read from across a room.
  • Keep the quiet zone clear. Do not let a border, text or a photo run into the light margin around the code.
  • Use a logo with a simple shape. Fine lettering inside a logo a quarter of the code wide will not be readable anyway.
  • Test on more than one phone, including an older one, before printing hundreds of copies.

Why a short link prints better

At level H, https://example.com fits in version 3, which is 29 modules across. A 40-character link with a path and a query string, such as https://example.com/spring-menu?table=12, needs version 5, which is 37 modules across. Printed at the same 3 cm, the modules of the longer link are about 22% narrower. That is the difference between a code that scans as soon as the phone is raised and one that needs the phone held closer and steadier.

The same arithmetic explains why lowering the error-correction level is tempting. That 40-character link fits in version 3 at level L. But dropping to L throws away most of the margin that lets a code survive a scuff, a fold, a glossy reflection or a logo.

How much a logo really covers

A plate a quarter of the symbol's width covers about one sixteenth of its area, or a little over 6%. Error correction at H is designed to rebuild about 30% of the data, so on paper there is plenty of room. In practice the hidden modules are not spread evenly across the error-correction blocks, and a smudge or a curved surface adds its own damage, which is why the plate is capped at 25% rather than allowed to grow.

The white plate matters as much as the logo. Without it, the logo's own edges blend into the modules around it, and the scanner sees a ragged patch it cannot place. The plate gives a clean boundary, and the scanner treats everything inside it as missing data to be rebuilt.

Static codes and what changing them means

Nothing here sits between the code and its destination. Scanning the code reads the text straight out of the pattern, so there is no account to keep active and no redirect that can lapse. The cost of that is permanence: the only way to change where a printed code goes is to change what lives at the address it already holds.

For a link to your own website, that is easy to arrange. Use a path you will keep, such as /menu, and redirect it on your own server when the real page moves.

Frequently asked questions

Which error-correction level should I choose?

H when the code has a logo or will live somewhere it can get scratched or wet, such as a table or a shop window. Without a logo, on clean paper, M is a reasonable balance between robustness and module size.

Should I download the PNG or the SVG?

The SVG for print layouts and anything larger than a few centimetres, because its modules are vector shapes that stay sharp when scaled. The PNG for places that only accept bitmap images, such as some web forms and messaging apps.

Can I make a code that joins a Wi-Fi network?

Yes, by typing the text in the format phones recognise, for example WIFI:T:WPA;S:Cafe Guest;P:latte2026;; with your own network name and password. The password is stored in the code as plain text, so anyone who scans it can read it.

Why does the code get denser when I switch from L to H?

Higher levels add more error-correction data to the same message, so the code needs more modules to hold it. https://example.com is version 2 at levels L, M and Q but version 3 at H.

Does the code expire?

No. The text is part of the pattern, so the code reads the same for as long as the print survives. Whether the page it links to still exists is up to whoever runs that page.