PHPackages                             octacrafts/oc-qr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. octacrafts/oc-qr

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

octacrafts/oc-qr
================

Framework-agnostic QR Code generation library for PHP (ISO/IEC 18004)

1.0.0(1mo ago)014↓88.9%1MITPHPPHP ^8.1CI passing

Since Jun 1Pushed 1mo agoCompare

[ Source](https://github.com/octacrafts/oc-qr)[ Packagist](https://packagist.org/packages/octacrafts/oc-qr)[ RSS](/packages/octacrafts-oc-qr/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (3)Used By (1)

OC-QR
=====

[](#oc-qr)

[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)

**octacrafts/oc-qr** — A framework-agnostic PHP library for generating scannable QR codes (ISO/IEC 18004).

Maintained by **[OctaCrafts](https://octacrafts.com)**.

Pure PHP core with no Laravel or Symfony dependency. Use it in any PHP 8.2+ project, or wrap it in a Laravel package for your ecosystem.

About OctaCrafts
----------------

[](#about-octacrafts)

[OctaCrafts](https://octacrafts.com) is a global IT systems and software engineering company that builds scalable digital ecosystems for businesses worldwide. From idea to launch, the team delivers enterprise-grade solutions focused on long-term growth, performance, and reliability.

**What we do:**

- **Web Development &amp; Design** — modern, responsive, high-performance websites
- **SaaS &amp; ERP Solutions** — custom platforms that automate workflows and centralize operations
- **Mobile Apps Development** — scalable Android, iOS, and cross-platform applications
- **DevOps &amp; Deployment** — secure cloud infrastructure, automation, and monitoring
- **Web Maintenance** — ongoing security updates, backups, and technical support
- **Infographics &amp; Motion Graphics** — visual content and animations for clear communication

Beyond client projects, OctaCrafts maintains open-source PHP libraries under the `oc/*` package family on [GitHub @octacrafts](https://github.com/octacrafts). Each ecosystem follows a core-plus-wrapper pattern: framework-agnostic cores for plain PHP and any PSR-compliant app, with dedicated integrations for popular frameworks.

`octacrafts/oc-qr` is the framework-agnostic core for ISO/IEC 18004 QR code generation. Framework-specific wrappers can build on this package for Laravel, Symfony, and other stacks.

Features
--------

[](#features)

- ISO/IEC 18004–compliant matrix generation (versions 1–40)
- Automatic encoding mode selection: numeric, alphanumeric, and byte (mixed-mode)
- Kanji and ECI encoders for extended payloads
- Reed–Solomon error correction (levels L, M, Q, H)
- Optimal mask pattern selection (8 patterns, penalty scoring)
- PNG and SVG output
- Clean architecture: pipeline stages, interfaces, and swappable components

Requirements
------------

[](#requirements)

RequirementNotesPHP`^8.2`ext-gdRequired for PNG outputext-jsonRequiredSVG output does not require GD.

Installation
------------

[](#installation)

```
composer require octacrafts/oc-qr
```

Quick start
-----------

[](#quick-start)

```
