QR Code Generator

GitHub license npm scope

Fully-functional QR code generator for Node.js and the browser, with zero dependencies

Quickstart

Simple and quick way to generate QR codes

> npm install @liquid-js/qrcode-generator
import { QRCode } from '@liquid-js/qrcode-generator/lib/qrcode/QRCode.js'

const qrCode = new QRCode()
qrCode.addData(
    'https://qrky.to',
    'byte'  // mode: numeric, alphanumeric, byte (default, ASCII-encoded text)
    // *kanji and unicode modes are supported by importing the corresponding encoding
)

// Build the QR code after adding all the data
qrCode.make()

// Code as ASCII characters
console.log(qrCode.createASCII(
    2,  // 2 terminal cells per block
    4   // 4 cells of margin
))