DT
DevToolKit
Clearly labeled tools
Tools
Workspaces
Resources
Browse tools
DT
DevToolKit
Practical PDF, image, developer, and everyday tools

Clearly labeled processing for everyday tasks.

Core processing runs in the browser for most tools. Server-backed and external-provider workflows are labeled separately. Basic tools are available without signup; individual limits vary by tool.

46 unique tools4 workspacesNo signup for basic tools
Browse toolsTrust Center
Tools
All toolsPDF workspaceImage studioDeveloper workbenchGeneral tools
Product
BlogSupportContact
Company
AboutTrust CenterPrivacy PolicyTerms of Use

© 2026 DevToolKit. Practical PDF, image, developer, and everyday tools with clearly labeled processing.

In-browserServer-backedExternal preview
amanhirut32@gmail.com
HomeToolsDeveloperQR Code Generator

QR Code Generator

  • In-browser
  • No signup
  • PNG / SVG export

Encode a URL, plain text, mailto, tel, or WIFI: string into a QR image in the browser, then preview and download PNG or SVG.

Core processing runs in your browser and does not upload this file for the task.

Preparing the editor...

The guide and instructions on this page are available while the tool loads.

Continue your workflow

  • URL Encoder/DecoderPercent-encode a query value or URL. This page puts the typed string into a QR payload; it does not call encodeURIComponent.
  • Color ConverterConvert HEX, RGB, and HSL. This page only accepts #RGB, #RRGGBB, or six hex digits for qrcode color options.

What this QR Code Generator creates

QrCodeGenerator.jsx builds one payload string with buildQrValue, then asks the qrcode package for a PNG data URL (QRCode.toDataURL) shown in QR preview, and optionally an SVG string (QRCode.toString). Creating that image does not verify that the encoded destination is safe, reachable, correct, scannable on every device, connected to Wi-Fi, or accepted by an email, SMS, or phone application.

Default form is DEFAULTS: type url, empty fields, size 512, margin 2, colors #000000 / #ffffff, errorCorrection M, wifiEncryption WPA, wifiHidden false. There is no file import of an existing QR.

The content types and payloads this page actually builds

URL (default)
text.trim(). No scheme is prepended. type="url" on the input is HTML only.
Text
The textarea value as typed (buildQrValue does not trim). canGenerate still requires qrValue.trim().
Email
mailto:{email.trim()} plus optional ?subject=&body= from URLSearchParams when those fields trim non-empty. Requires email.trim().
Phone
tel:{phone.trim()}. Requires phone.trim(). No extra digit validation.
WiFi
WIFI:T:{WPA|WEP|nopass};S:{escaped SSID};P:{escaped password};H:true|false;; Requires wifiSsid.trim(). Password may be empty.

Wi-Fi escaping is wifiSsid/wifiPassword.replace(/([\\;,:"])/g, "\\$1") before interpolation. The encryption select labels WPA as “WPA / WPA2” but the payload value is WPA, WEP, or nopass. There is no SMS constructor in this switch.

Size, margin, color, and error-correction controls, if implemented

SIZE_OPTIONS are 256, 512, and 1024, passed as width. Margin is a range 0–8 (step 1). ERROR_CORRECTION_OPTIONS are L/M/Q/H labeled Low/Medium/Quartile/High, passed as errorCorrectionLevel. Those letters are what this file sends to qrcode; the page does not document library capacity tables.

sanitizeHexColor accepts # plus 3 hex digits, # plus 6 hex digits, or 6 hex digits with a # prepended; otherwise it returns the black or white fallback. The color picker binds to the sanitized value; the text field binds to form.darkColor / form.lightColor.

How to use each real form type

  1. Idle: URL pressed, Destination URL empty (placeholder https://example.com), QR preview “Waiting for input” / “Your QR code preview will appear here.” Download PNG, Download SVG, and Copy image are disabled. Content helper: “Enter content to generate a QR code.”
  2. Click URL, Text, Email, Phone, or WiFi (aria-label Content type). There is no SMS type.
  3. URL: Destination URL. Amber tip if the trimmed string lacks http:// or https:// (generation still runs; the page does not fetch).
  4. Text: Text content textarea (placeholder “Enter text to encode in the QR code.”).
  5. Email: Email address required (placeholder name@example.com); Subject (optional) and Message (optional).
  6. Phone: Phone number required (placeholder +1 555 0100). No extra digit validation.
  7. WiFi: Wi-Fi name (SSID) required (placeholder MyWiFi); Password optional; Encryption WPA / WPA2 (default), WEP, or No password; Hidden network checkbox.
  8. When canGenerate is true, useEffect runs generateQr. Generate QR code only increments generateTick. Customize Size 256px / 512px / 1024px, Error correction Low / Medium / Quartile / High, Foreground color, Background color, and Margin (0–8).
  9. QR preview img alt is “Generated QR code preview”. Click Download PNG (qr-code.png), Download SVG (qr-code.svg), Copy image (Copied for 1.5 seconds when clipboard.write and ClipboardItem exist), or Reset. The dashed Customize note says “Logo embedding will be available in a future update.” There is no Load example or scanner test.

Preview, copy, and download behavior

Preview is an img whose src is the toDataURL result (alt “Generated QR code preview”). Download PNG uses downloadDataUrl(qrDataUrl, "qr-code.png"). Download SVG generates a new SVG with the same payload and options (including width) and downloadTextFile(..., "qr-code.svg", "image/svg+xml"). Copy image fetch()es the data URL, wraps a PNG ClipboardItem, and is omitted from the DOM when canCopyImage is false.

Reset sets DEFAULTS and clears qrDataUrl, error, warning, hasGenerated, and copiedImage. There is no Load example control.

Input length, warnings, and scanning limitations

LONG_CONTENT_WARNING is 1000: if qrValue.length exceeds that, an amber message says content is getting long and very large QR codes may be harder to scan or exceed capacity at high error correction. That is not a hard cutoff. If toDataURL throws and length is still over 1000, the red error tells you to try shorter text or lower error correction; otherwise “Failed to generate QR code. Please check your input and colors.”

The page never runs a camera or third-party scanner. Contrast, print size, and reader apps are outside this file. Error-correction letters are library options, not a promise that a damaged print will still scan.

A QR image versus a safe or verified destination

URL mode does not HEAD/GET the destination. Email mode does not send mail. Phone mode does not dial. Wi-Fi mode does not join a network. The ToolTipsCard safety note says QR codes can hide links and to scan only codes from sources you trust — that is on-page copy, not a URL reputation check.

What this tool does not validate or guarantee

  • That a scanner, phone, or OS will open mailto:, tel:, or WIFI: the way you expect.
  • That an email address, phone number, or URL is well-formed beyond trim/non-empty (and the URL prefix tip).
  • SMS, vCard, geo, or logo-in-the-center encoding.
  • Universal ISO/IEC QR compliance as a product certification — this file calls qrcode with the options above.
  • Tracking, analytics of scans, or a public QR hosting URL.

Privacy and browser-processing boundaries

Generation runs in the tab via the qrcode import. QrCodeGenerator.jsx does not call trackToolEvent and does not POST the payload to a QR API. Footer copy says QR codes are generated locally. Wi-Fi password remains in React state until Reset or a refresh. Clipboard and downloads stay in the browser. Site assets, ads, and extensions remain outside this helper.

A short pre-share checklist

  • Read the encoded type: trimmed URL vs raw text vs mailto: vs tel: vs WIFI:.
  • If the URL warning is showing, decide whether you meant a web URL or plain text.
  • For Wi-Fi, confirm T/S/P/H match the actual network (WPA payload value vs the “WPA / WPA2” label).
  • If payload length is over 1000, treat the amber text as a scan-capacity hint, not a pass.
  • Download PNG or SVG and test with the scanner you will actually use — this preview is not that test.
  • Do not treat the image as proof the destination is safe or reachable.

When another DevToolKit tool is more appropriate

  • URL Encoder/Decoder — when you need encodeURIComponent / encodeURI. This page stores the typed URL or query pieces as the QR string; it does not percent-encode the URL field.
  • Color Converter — when you need RGB or HSL conversion. Foreground/background here only pass sanitizeHexColor into qrcode.

Frequently asked questions

Does generation wait for the button?

No. When canGenerate is true, useEffect runs generateQr on payload and option changes. Generate QR code bumps generateTick to run again. Empty required fields clear the preview.

Does a URL QR mean the site is safe or reachable?

No. URL mode encodes text.trim(). getUrlWarning only notes a missing http:// or https:// prefix and still generates. The page does not fetch the URL.

Is there an SMS or logo mode?

No. QR_TYPES is url, text, email, phone, wifi. The customize panel states logo embedding will be available in a future update — it is not implemented.

Is the payload uploaded?

QRCode.toDataURL and QRCode.toString run in QrCodeGenerator.jsx. The file does not import trackToolEvent and does not POST to a QR API.

Related guides

Longer reads that pair well with this tool.

Developer guide

Useful Developer Tools Every Browser Should Have

Fourteen In-browser developer utilities for JSON, encoding, tokens, diffs, hashes, regex, SQL, UUIDs, and timestamps — fast checks without installing anything.

Business guide

How to Create QR Codes for Business

Create a static URL, text, email, phone, or Wi-Fi QR code, review the generated payload and preview, then test the export in its intended use.

Related tools

Common next steps after using this tool.

URL Encoder / Decoder

Encode and decode URLs, query parameters, and text directly in your browser.

Color Converter

Convert among HEX, RGB, and HSL using this page’s parsers and formulas, then copy CSS snippets or review a two-color contrast ratio.

Explore more in Developer

Browse related tools or open the full workspace.

Developer workspaceAll tools