QR Code Generator is a modern QR tool for creating scannable codes from URLs, text, and common templates (Wi‑Fi, contact, email, SMS, phone). Customize colors, size, error correction, and logo overlay with live preview, then export as PNG/SVG/PDF, copy/share, decode existing QR images, and keep a lightweight local history — no accounts, no backend required.
The current product was created by Jonathan Rycx, who leads product direction, design, and full-stack implementation.
- Generate QR codes from:
- Text / URL
- Wi‑Fi (SSID, password, auth, hidden network)
- Contact (vCard)
- Email, SMS, Phone
- Foreground/background colors with live preview + one-click Sync with theme
- Error correction (L / M / Q / H) and size controls (128–400px)
- Optional logo overlay with adjustable size
- Safe mode to improve scanning when a logo is enabled (forces High + adds padding)
- Built on
react-qr-code
- Default QR colors follow light/dark design tokens via a DOM probe (
readThemeQrHexFromDocument) - Editing colors locks them; Sync with theme resets the lock and reapplies token colors
ThemeColorMetaupdates<meta name="theme-color">when the resolved theme changes (PWA / mobile chrome bar)
- Download as PNG, SVG, or PDF
- Copy image to the clipboard (
ClipboardItemimage/png) where supported - Share via the Web Share API with a PNG file when
navigator.canShareallows it - Successful export actions append an entry to local history
- PDF export uses
pdf-lib
- Last 20 payloads stored locally in
localStorage(qr-code-generator-history-v2) - Restore a previous entry with one tap
- Favorites, duplicate, and inline edit (name + tags)
- Clear history wipes local storage
- Upload a QR image to extract its content (client-side via
jsqr) - Copy decoded text or Use it to populate the generator
- Web app manifest and service worker (production builds) via
@ducanh2912/next-pwa - Apple startup splash screens (
metadata.appleWebApp.startupImage) — spec insrc/lib/apple-splash-spec.json, assets inpublic/splash/ - App icons + splash + favicons are generated from
public/icon-qr-code.svg/public/icon-qr-code.png:- Run
npm run generate:iconsafter updating the icon files - Splash background color is #090E16
- Run
PwaInstallBanner: Chrome install prompt + iOS “Add to Home Screen” guidance- Mobile layout:
100dvh, safe-area padding,viewport-fit=cover,touch-manipulation,black-translucentstatus bar
- Next.js 16 (App Router,
src/app) —next build --webpackfor@ducanh2912/next-pwa - React 19
- Tailwind CSS 4 (design tokens in
src/app/globals.css) - Shadcn UI + Radix + Lucide
- Playwright (
e2e/) — smoke tests for home, theme toggle, download toast, skip link. First run:npx playwright install chromium.
- Node.js 20.19+ (or 22.13+)
- npm
git clone https://github.com/Rixouu/qrcodegenerator.git
cd qrcodegenerator
npm install
npm run devDefault dev URL: http://localhost:3000
Create a .env.local in the project root. Next.js automatically loads this for local development.
NEXT_PUBLIC_SITE_URL=http://localhost:3000Canonical site URL for Open Graph, sitemap, robots, and metadataBase (must include https:// in production).
qrcode-generator/
├── e2e/ # Playwright specs
├── public/ # Static assets, icons, splash
├── scripts/ # icon + splash generators
├── src/
│ ├── app/ # layout, page, OG image, robots, sitemap, manifest
│ ├── components/ # QR UI, PWA banner, theme, toaster
│ ├── hooks/ # use-theme-qr-colors, use-client-mounted
│ └── lib/ # cn, qr-png, qr-history, site-url, splash metadata
├── playwright.config.ts
├── next.config.mjs
└── package.jsonnpm run dev # Next dev (Webpack, required by PWA plugin)npm run build # Production build
npm run start # Production servernpm run lint # ESLint
npm run test:e2e # Playwright (build + server on 127.0.0.1:4173)npm run generate:icons # Regenerate public/icons, public/splash, favicons- Skip to content link (visually hidden until focus) →
#main-contentwithtabIndex={-1} - QR preview wrapped in
role="img"+aria-labeldescribing the encoded payload (truncated) - Labeled controls for URL, correction level, size, colors, and theme buttons
metadataBase, Open Graph, and Twitter card metadata insrc/app/layout.tsxsrc/lib/site-url.ts: setNEXT_PUBLIC_SITE_URLin production so canonical URLs resolve correctlyopengraph-image.tsx— generated 1200×630 preview card
- Light / system / dark via
next-themes,ThemeTogglein the header - Sonner toast synced to
resolvedTheme
vercel.json— security headerspackage.json>overrides— cleannpm auditfor transitivepostcss/serialize-javascriptoutputFileTracingRootinnext.config.mjs— workspace lockfile quirk
npm run build
npm run startDeploy with any Node-capable SSR environment that can run the built server output. Configured for standalone output for Docker-style deploys.
Set NEXT_PUBLIC_SITE_URL on the host for correct SEO URLs.
Contributions are welcome. If you add features or routes:
- Run
npm run lint - Run
npm run test:e2e(uses port 4173; ensure it is free) - Open a PR describing behavior + any storage key changes
No LICENSE file was found in this repository. If usage terms exist, they are expected to be defined by the project owner.
- Jonathan — Lead Developer — Rixouu
- Next.js for the React framework
- Shadcn UI for accessible components
- Tailwind CSS for the UI foundation
- react-qr-code for the core QR logic
Built with ❤️ for quick, shareable QR codes.