Blog

The Best ESC/POS Libraries on GitHub (2026 Comparison by Language)

1 November 2026 · 5 min read · By the Raw Print team

The best ESC/POS library depends on your language: python-escpos for Python, escpos-php for PHP, @point-of-sale/receipt-printer-encoder for JavaScript in the browser or Node.js, node-thermal-printer for Node.js network printing, escpos-coffee for Java, ESC-POS-.NET for C#, and ESCPOS-ThermalPrinter-Android for native Android apps. We compared stars, licences and recent activity on GitHub in October 2026, and note which projects are still actively maintained.

Our picks:

  • Most popular overall: mike42/escpos-php (about 2,800 stars, release in 2026)
  • Most active: python-escpos and receipt-printer-encoder (both updated in autumn 2026)
  • For web apps: receipt-printer-encoder, which runs in the browser and supports ESC/POS and StarPRNT
  • For native Android: DantSu's ESCPOS-ThermalPrinter-Android (Bluetooth, USB, TCP)

The comparison table

Stars and dates come from the GitHub API on 19 October 2026. "Last push" is the most recent commit to the repository, a rough signal of whether it's maintained.

LibraryLanguageStarsLicenceLast push
mike42/escpos-phpPHP~2,800MITAug 2026
lsongdev/node-escposNode.js~1,580MITSep 2024
DantSu/ESCPOS-ThermalPrinter-AndroidAndroid (Java)~1,550MITMay 2024
python-escpos/python-escposPython~1,330MITOct 2026
Klemen1337/node-thermal-printerNode.js~920MITAug 2026
receiptline/receiptlineJavaScript~780Apache-2.0Jul 2026
lukevp/ESC-POS-.NETC# / .NET~670MITSep 2024
at-point-of-sale/EscPosEncoderJavaScript~380MITSep 2024 (superseded)
anastaciocintra/escpos-coffeeJava~350MITJun 2024
at-point-of-sale/ReceiptPrinterEncoderJavaScript~330MITSep 2026
kenshaw/escposGo~260MITJun 2023
wwandreww/esc_pos_utilsFlutter / Dart~170BSD-3-ClauseJun 2024
fabienbellanger/escpos-rsRust~120See repoOct 2026
hennedo/escposGo~120MITJul 2024

Stars measure popularity, not quality. A library that hasn't changed in two years can still be perfectly good for a stable protocol like ESC/POS; just check that open issues don't show breakage on current platforms.

Python: python-escpos

The standard choice for Python, with USB, serial, network, CUPS and Windows printer backends, plus a Dummy printer for tests. It uses a printer capability database to know each model's code pages and features. Very active in 2026 (version 3.1).

Best for: back-office scripts, kiosks, Raspberry Pi printers and Django or Flask apps that print on the local network.

PHP: escpos-php

The most-starred ESC/POS library on GitHub, with a long history and good documentation. Network, Windows-shared and file connectors; text styles, images, barcodes, QR codes, cutting and the cash drawer. The current release needs PHP 8.2+.

Best for: PHP POS systems and Laravel apps that print to network printers. Examples in ESC/POS in PHP, Java, C# and Flutter.

JavaScript: receipt-printer-encoder (formerly esc-pos-encoder)

Niels Leenheer's encoder turns a chain of method calls into printer bytes, in the browser or Node.js. It supports ESC/POS and StarPRNT, automatic code page selection, tables, boxes, barcodes, QR codes and dithered images. The older EscPosEncoder repository still has more stars, but the new package is the maintained one. Companion packages connect to printers over WebUSB, Web Bluetooth, Web Serial and the network.

Best for: web POS systems. Pair it with a print app on Android to reach Bluetooth Classic printers. See ESC/POS in JavaScript and Node.js.

Node.js: node-thermal-printer and node-escpos

  • node-thermal-printer builds jobs for Epson- and Star-compatible printers and sends them to network printers (tcp://ip:9100), system printers or ports. Actively maintained.
  • node-escpos includes USB, network and serial adapters. It's popular, but its latest npm release is a 2022 alpha, and its USB adapter depends on native libusb bindings.

Java: escpos-coffee

A clean object-oriented API with styles, barcodes, QR codes, PDF and image printing, and several dithering algorithms. Output streams for system printers and TCP; the samples repository adds USB and serial.

Best for: Java desktop and server applications.

C# / .NET: ESC-POS-.NET

Cross-platform (.NET on Windows, Linux and macOS) with network, serial and file printers, an EPSON command emitter and status monitoring. A natural fit for Windows POS software and .NET services.

Android: ESCPOS-ThermalPrinter-Android

DantSu's library prints from native Android apps over Bluetooth, TCP and USB, with a simple text markup for formatting, images and barcodes. It's the most-starred Android-specific option.

The alternative: if you'd rather not manage Bluetooth permissions and reconnection in your app, send the job to a print service app with an intent or a rawbt: link. Raw Print accepts raw ESC/POS, text, HTML, images and PDFs this way. See thermal printing from hybrid apps for the pattern.

Flutter: esc_pos_utils and esc_pos_utils_plus

The original esc_pos_utils package generates ESC/POS bytes from a capability profile but hasn't had a pub.dev release since 2021. Most projects now use the esc_pos_utils_plus fork with a transport package such as print_bluetooth_thermal.

Go and Rust

  • Go: kenshaw/escpos (simple command wrapper) and hennedo/escpos (images, barcodes and QR codes). Both are small and stable rather than active.
  • Rust: fabienbellanger/escpos-rs is actively developed. For testing, two Rust-based emulators are covered in ESC/POS emulators and virtual printers.

Other useful projects

  • receiptline (Apache-2.0): "markdown for receipts". Write receipts in a simple markup and render them to printer commands or SVG previews.
  • escpos-printer-db (CC-BY-4.0): a database of receipt printer models, their code pages and features. Libraries use it to pick the right settings per printer.
  • Open ESC/POS Print Service (GPL-3.0): a complete open-source Android print service, if you need one you can modify.

"ESC/POS driver" and "ESC/POS software": what people mean

How to choose

  1. Start from where the printer is. On the server's network: a server-side library. At the customer's counter: the browser or a device app must do the sending.
  2. Check the transport. Does the library actually support USB, Bluetooth or network on your platform?
  3. Check text encoding. Does it handle your language's code page, or render text as images?
  4. Check activity. Look at recent commits and how maintainers respond to issues.
  5. Test on your printer, ideally after an emulator pass.

New to the protocol? Read what is ESC/POS? and keep the command reference open.

Frequently asked questions

What is the most popular ESC/POS library?

By GitHub stars, mike42/escpos-php, with about 2,800 stars in October 2026. python-escpos, node-escpos and DantSu's Android library each have well over a thousand.

Is there an ESC/POS library for the browser?

Yes: @point-of-sale/receipt-printer-encoder builds the bytes in the browser, and companion packages send them over WebUSB, Web Bluetooth or Web Serial.

Are these libraries free for commercial use?

Most use permissive licences (MIT, BSD, Apache-2.0) that allow commercial use. Check each repository's licence, and note that GPL projects such as Open ESC/POS Print Service have stronger obligations.

Do ESC/POS libraries work with Star printers?

With Star printers in ESC/POS emulation mode, yes. For StarPRNT mode, use a library that supports it, such as receipt-printer-encoder, or Star's own SDK.