PHPackages                             horde/barcode - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. horde/barcode

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

horde/barcode
=============

Horde Barcode and QR Code Rendering and Parsing Library

v1.0.0(4w ago)02LGPL-2.1PHPPHP ^8.1

Since May 12Pushed 2mo agoCompare

[ Source](https://github.com/horde/Barcode)[ Packagist](https://packagist.org/packages/horde/barcode)[ Docs](http://www.horde.org/libraries/Horde_Barcode)[ RSS](/packages/horde-barcode/feed)WikiDiscussions FRAMEWORK\_6\_0 Synced 3w ago

READMEChangelog (3)Dependencies (6)Versions (5)Used By (0)

Horde Barcode
=============

[](#horde-barcode)

Barcode and QR code generation and reading library for PHP 8.1+.

Encodes data into 1D and 2D barcode symbologies and renders them as HTML, raster images (via horde/Image), SVG or PDF (via horde/Pdf). Decodes barcodes from module matrices and bar patterns back into structured data. Includes a semantic layer for some popular structured payload formats (payments, contacts, WiFi, GS1, healthcare, etc.) with bidirectional encode/decode support.

**Status:** Encoding and rendering are fully implemented. Reading/decoding from images is designed (interfaces defined) but not yet implemented. Contributions welcome. :)

Quick Start
-----------

[](#quick-start)

```
use Horde\Barcode\Barcode;

// QR code as HTML table
echo Barcode::qrHtml('https://www.horde.org/');

// Code 128 as HTML
echo Barcode::code128Html('INV-2026-0042');

// EAN-13 as HTML
echo Barcode::eanHtml('5901234123457');

// Data Matrix as HTML
echo Barcode::dataMatrixHtml('Serial:ABC123');
```

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

[](#requirements)

- PHP 8.1+ with ext-mbstring
- No other required dependencies (HTML renderer is standalone)

### Optional

[](#optional)

- `horde/image` for raster (PNG/JPEG) and SVG output
- `horde/pdf` for PDF output
- `horde/otp` for OTP provisioning URI generation

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

[](#installation)

```
composer require horde/barcode
```

Supported Standards
-------------------

[](#supported-standards)

### Barcode Symbologies

[](#barcode-symbologies)

ClassStandardCommon NameDescription`QrEncoder`[ISO/IEC 18004](https://www.iso.org/standard/62021.html)QR Code2D matrix barcode, versions 1–40, EC levels L/M/Q/H`DataMatrixEncoder`[ISO/IEC 16022](https://www.iso.org/standard/44230.html)Data Matrix2D matrix barcode, ECC200 error correction`Code128Encoder`[ISO/IEC 15417](https://www.iso.org/standard/43896.html)Code 128High-density linear barcode, character sets A/B/C`EanUpcEncoder`[ISO/IEC 15420](https://www.iso.org/standard/46143.html)EAN/UPCRetail point-of-sale (EAN-13, EAN-8, UPC-A, UPC-E)`Code39Encoder`[ISO/IEC 16388](https://www.iso.org/standard/43897.html)Code 39Alphanumeric linear barcode (A–Z, 0–9, symbols)`Itf14Encoder`[ISO/IEC 16390](https://www.iso.org/standard/43898.html)ITF-14Interleaved 2-of-5 for shipping cartons### Semantic Payload Formats

[](#semantic-payload-formats)

ClassFormatUse CaseReference`OtpProvisioning`otpauth:// URITOTP/HOTP provisioning[Google Authenticator Key URI](https://github.com/google/google-authenticator/wiki/Key-Uri-Format)`WiFi`WIFI:…;;WiFi network sharing[WPA3 / Wi-Fi Alliance](https://www.wi-fi.org/)`VCard`MECARD:…;;Contact sharing[NTT DoCoMo MeCard](https://www.nttdocomo.co.jp/english/)`Url`HTTP/HTTPS URLWeb links[RFC 3986](https://www.rfc-editor.org/rfc/rfc3986)`Email`mailto: URIEmail composition[RFC 6068](https://www.rfc-editor.org/rfc/rfc6068)`Sms`smsto: URISMS composition[RFC 5724](https://www.rfc-editor.org/rfc/rfc5724)`Tel`tel: URIPhone dialing[RFC 3966](https://www.rfc-editor.org/rfc/rfc3966)`SepaEpc`EPC069-12EU SEPA credit transfer[European Payments Council](https://www.europeanpaymentscouncil.eu/document-library/guidance-documents/quick-response-code-guidelines-enable-data-capture-initiation)`EmvQr`EMVCo Merchant QRPayment terminal QR[EMVCo QR Specification](https://www.emvco.com/emv-technologies/qrcodes/)`Pix`BCB PixBrazilian instant payments[Banco Central do Brasil](https://www.bcb.gov.br/estabilidadefinanceira/pix)`Upi`UPI Deep LinkIndian instant payments[NPCI UPI](https://www.npci.org.in/what-we-do/upi/product-overview)`Gtin`GTIN-8/12/13/14Product identification[GS1 GTIN](https://www.gs1.org/standards/id-keys/gtin)`Gs1Barcode`GS1 AI Element StringsSupply chain data[GS1 General Specifications](https://www.gs1.org/standards/barcodes-epcrfid-id-keys/gs1-general-specifications)`DigitalLink`GS1 Digital Link URIWeb-resolvable product IDs[GS1 Digital Link](https://www.gs1.org/standards/gs1-digital-link)`IataBcbp`IATA Resolution 792Airline boarding passes[IATA BCBP](https://www.iata.org/en/programs/passenger/common-use/)`Udi`FDA 21 CFR 830 / EU MDRMedical device identification[FDA UDI](https://www.fda.gov/medical-devices/unique-device-identification-system-udi-system)`Hibc`ANSI/HIBC 2.6Healthcare product labeling[HIBCC](https://www.hibcc.org/)Documentation
-------------

[](#documentation)

See [doc/USAGE.md](doc/USAGE.md) for full API documentation and examples.

License
-------

[](#license)

LGPL-2.1 — see [LICENSE](LICENSE).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Total

3

Last Release

29d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c931cd02664859360478593450d6c473a05bb12b209dfacfc534cd13257cc7ef?d=identicon)[ralflang](/maintainers/ralflang)

![](https://www.gravatar.com/avatar/e4f6c6771993db2ed500959b42353f6cf6a2ca0406d9617f7ae680f4504faa4a?d=identicon)[horde](/maintainers/horde)

![](https://www.gravatar.com/avatar/816e2b926f25f8cd2939054c7a7173011b4303d690e25ab61bf33cf8c7cf71ae?d=identicon)[tdannhauer](/maintainers/tdannhauer)

---

Top Contributors

[![ralflang](https://avatars.githubusercontent.com/u/646976?v=4)](https://github.com/ralflang "ralflang (6 commits)")

---

Tags

qrcodeqrdatamatrixbarcodeeancode128gs1

### Embed Badge

![Health badge](/badges/horde-barcode/health.svg)

```
[![Health](https://phpackages.com/badges/horde-barcode/health.svg)](https://phpackages.com/packages/horde-barcode)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k14.4M55](/packages/milon-barcode)[khanamiryan/qrcode-detector-decoder

QR code decoder / reader

1.4k32.4M77](/packages/khanamiryan-qrcode-detector-decoder)[bitgrave/barcode-bundle

provide barcode rendering service into your Symfony2 application.

24447.2k1](/packages/bitgrave-barcode-bundle)[kekos/gs1

GS1 parser and generator for PHP

155.8k](/packages/kekos-gs1)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
