Skip to main content

QR Code Generator

Create QR codes instantly from any URL. This tool is lightweight, fast, and fully client-side—no external API required.

Live Demo

Features

  • Instant generation — no page reloads
  • Client-side only — your data never leaves the browser
  • Simple interface — just paste and generate
  • Reusable component — easily integrate into other projects

How It Works

This generator uses a lightweight QR library to convert a URL into a base64 image rendered directly in the browser.

Basic flow:

  1. User inputs a valid URL
  2. Form submission triggers generation
  3. QR code is converted into an image (data URL)
  4. Image is rendered instantly on screen

Usage Example

You can reuse this component anywhere in your project:

import QRGenerator from "@site/src/components/qr-code-generator";

export default function Page() {
return (
<div>
<h1>Generate a QR Code</h1>
<QRGenerator />
</div>
);
}