Eskillsfy

Home / Blog / Generators

Generators · 23 Nov 2026

QR Code Generator: how it works and how to build one

Styled QR codes for links, Wi-Fi, contacts, UPI payments and more. This guide explains what happens behind the button and shows the code, so you can build your own.

What it does

Make QR codes for 11 types: website links, text, Wi-Fi login, contact cards (vCard), email, SMS, phone calls, WhatsApp chats, UPI payments, map locations and calendar events. Style them with rounded or dot patterns, custom corner shapes, colors or a gradient, a transparent background, a frame with a call to action like SCAN ME, and your logo in the middle. Download PNG up to 4096 px, SVG for print, or JPG, or copy the image straight to the clipboard. Codes are static and never expire.

When to use it

  • Menus and posters
  • Sharing Wi-Fi with guests
  • UPI payment codes
  • Business cards

How to use it

  1. Pick a type such as Link, Wi-Fi, Contact or UPI pay, and fill in the details.
  2. Style it: dot pattern, corners, colors, frame text and logo.
  3. Download PNG, SVG or JPG, then scan it with your phone to check.

Try it free in your browser, nothing is uploaded: https://eskillsfy.com/tools/qr-code-generator

How it works

A QR code stores data as a grid of dark and light modules, with three big squares (finder patterns) so a camera can find and straighten it. Reed–Solomon error correction lets the code still scan when up to 30% is damaged, which is why a logo can sit in the middle.

The tool uses a QR library only for the grid of modules, then draws each module itself as SVG, which allows round dots, custom eyes, gradients and frames. Wi-Fi, contact and event codes are just text in a standard format (WIFI:, BEGIN:VCARD, BEGIN:VEVENT) that phones recognise.

Build it yourself

Here is the core of the tool. It has no dependencies unless noted, so you can paste it into any TypeScript or JavaScript project.

qrSvg.ts (ts)

import qrcode from "qrcode-generator";

export function qrSvg(text: string, size = 512) {
  const qr = qrcode(0, "M"); // 0 = smallest version that fits
  qr.addData(text);
  qr.make();
  const n = qr.getModuleCount(), cell = size / (n + 8), q = cell * 4; // 4-module quiet zone
  let dots = "";
  for (let r = 0; r < n; r++)
    for (let c = 0; c < n; c++)
      if (qr.isDark(r, c)) dots += `<circle cx="${q + (c + 0.5) * cell}" cy="${q + (r + 0.5) * cell}" r="${cell * 0.45}"/>`;
  return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${size} ${size}"><rect width="100%" height="100%" fill="#fff"/><g fill="#000">${dots}</g></svg>`;
}

// Wi-Fi: WIFI:T:WPA;S:MyNetwork;P:secret;;

Make it production-ready

  • Draw the three finder eyes separately so they can have their own style.
  • Use error correction H when adding a logo, and leave its modules empty.
  • Export PNG by drawing the SVG onto a canvas.

Questions

Do the codes expire?

No. The data is in the code itself, there is no redirect service in between.

Will a logo stop it scanning?

When you add a logo the tool switches to error correction H (30%), so the hidden part is recovered. Keep the logo under about 25% and always test with a phone.

Which error correction should I pick?

M is a good default. Use H for printed codes, logos, or codes that might get scratched.

How does the UPI QR work?

It encodes a standard upi:// payment link with your UPI ID, name and optional amount. Any UPI app such as Google Pay, PhonePe or Paytm can scan it.

Try the QR Code Generator

Free, runs in your browser, nothing is uploaded.

Open it
Keep reading

More in Generators

All posts