Node.js renderers for QRCodeSDK. Use this package with @qrcodesdk/core when you need a PNG Buffer for files, HTTP responses, downloads, email attachments, or other server-side integrations.
Install
Section titled “Install”npm install @qrcodesdk/core @qrcodesdk/nodepnpm add @qrcodesdk/core @qrcodesdk/nodevp add @qrcodesdk/core @qrcodesdk/nodedeno add @qrcodesdk/core @qrcodesdk/nodebun add @qrcodesdk/core @qrcodesdk/nodeyarn add @qrcodesdk/core @qrcodesdk/nodeMinimal example
Section titled “Minimal example”import {qrcode} from '@qrcodesdk/core';import {QRCodePNGRenderer} from '@qrcodesdk/node';
const png = qrcode('https://qrcodesdk.dev').render(QRCodePNGRenderer());QRCodePNGRenderer() returns a Node.js Buffer containing a square, fully opaque PNG image.
Work with PNG output
Section titled “Work with PNG output”See the PNG Buffer renderer for compression, prepared PNG overlays,
and exact constraints. Follow Download or save to write the Buffer to
disk or Serve a QR code to return it as image/png.
Runtime requirements
Section titled “Runtime requirements”@qrcodesdk/node directly supports Node.js 22.0.0 or newer. Bun and Deno are supported through
their Node.js compatibility layers.
The public TypeScript API uses Node’s global Buffer type. TypeScript consumers must include
@types/node in their development dependencies and make Node types available in their TypeScript
configuration.
Package boundary
Section titled “Package boundary”@qrcodesdk/node provides Node-specific renderers and does not replace @qrcodesdk/core. The core package still provides qrcode(), matrix generation and builder options.
Public API
Section titled “Public API”import { type QRCodePNGImageOptions, QRCodePNGRenderer, type QRCodePNGRendererOptions,} from '@qrcodesdk/node';