Skip to content
PrinterArchive

Tools

ESC/POS

ESC/POS is a printer control command language created by Seiko Epson Corporation for point-of-sale (POS) receipt and thermal printers and related peripherals such as cash drawers and customer displays. Rather than describing a full page like a page-description language, it is a byte-oriented control stream: printable text interleaved with short command sequences that begin with a control character, most commonly ESC (0x1B) or GS (0x1D). Descended from Epson's earlier ESC/P language for dot-matrix printers, ESC/POS became the de facto command set for receipt printing and is implemented, in varying subsets, by many third-party thermal printers.

By PrinterArchive EditorialEdited by PrinterArchive Editorial

History

ESC/POS ("Epson Standard Code for Point of Sale") descends from ESC/P ("Epson Standard Code for Printers"), the escape-code control language Epson introduced for its dot-matrix printers beginning with the Epson MX-80 in 1980. ESC/P established the pattern of using the ESC control character to introduce formatting commands within an otherwise plain byte stream. As Epson built dedicated point-of-sale receipt printers (the "TM" model line), it developed the ESC/POS variant, described by Epson as a variant for controlling receipt printers as commonly used at the point of sale.

The exact introduction year of ESC/POS is not firmly documented in the primary sources available. What is documented is the trademark record: the "ESC/POS" trademark application was filed with the U.S. Patent and Trademark Office on June 8, 1990 (Serial No. 74067215) and registered on August 18, 1992 (Reg. No. 1709195), owned by Seiko Epson Kabushiki Kaisha, covering printers for POS systems and computer programs for POS systems used in retailing. This places the branded command set's emergence in the late 1980s to early 1990s era, layered on the earlier ESC/P foundation. The command reference has been revised many times; Microsoft's developer documentation links "ESC/POS Command Reference Revision 2.60."

The acronym is commonly given as "Epson Standard Code for Point of Sale"; this expansion is corroborated by third-party references rather than a primary Epson document. No individual inventor is attributed; ESC/POS is a Seiko Epson corporate development.

What problem it solved

Point-of-sale environments needed fast, low-overhead printing of narrow receipts on impact and later thermal printers, with features specific to retail: text emphasis, multiple character sizes, barcodes, logos, paper cutting, and control of an attached cash drawer. General-purpose page-description languages were heavy for this use. ESC/POS addressed two concrete problems:

  • Command-set fragmentation. Microsoft frames ESC/POS as "aimed at avoiding incompatible command sets by providing universal applicability" — one command vocabulary an application could target across many printer models.
  • Host processing load. Epson describes ESC/POS as a proprietary command system designed to reduce the processing load on the host computer in POS environments. Because commands are terse byte sequences and the printer performs the formatting, the host sends comparatively little data.

A practical consequence is portability across a product line: once software is written for one TM-series printer, it can serve as the basis for versions targeting other printers in the series.

How it works

An application opens a raw byte channel to the printer and writes a mixed stream:

  • Plain text bytes are printed as-is; line feed (LF, 0x0A) and carriage return advance and print lines.
  • Control sequences change printer state or trigger actions. They begin with a control byte — chiefly ESC (ASCII 27, 0x1B) or GS (ASCII 29, 0x1D) — followed by a command identifier and any parameters. In Microsoft's documented examples, ESC @ initializes the printer, ESC E with 0x01 turns bold on, and GS ! with 0x11 selects double-height and double-width characters.

Command categories in Epson's reference structure include print commands, line spacing, character formatting (emphasis, size, underline, font, code page and international character sets), print position and alignment, bit-image and graphics or logo (NV) printing, barcodes and 2-D symbols such as QR codes, status and real-time commands, mechanism control (paper feed and cut), and peripheral control (cash-drawer pulse, customer display).

ESC/POS printers generally operate in two documented printing modes: standard mode, which prints line by line as data arrives (natural for continuous receipts), and page mode, in which the printer buffers a defined print area and lays out data in a chosen direction before printing it as a block.

Where it sits in the print/document pipeline

ESC/POS is a device-level control language at the very end of the pipeline. There is typically no rich intermediate document — no spooled PDF or PostScript for the printer to interpret. The POS application, often via a POS SDK or API, composes the ESC/POS byte stream (text plus control codes, plus any pre-rasterized bitmap graphics) and sends it directly, frequently in "raw" pass-through mode so the operating system does not reformat it.

Layout that a conventional driver would normally perform is instead expressed inline as ESC/POS commands, or pre-rendered to a monochrome bitmap on the host and sent with the graphics or bit-image commands.

Relationship to printers

ESC/POS is the native command language of Epson's TM-series receipt printers, including the long-running TM-T88 thermal line and models such as the TM-T20, TM-m30, and mobile TM-P series. It is also implemented, with varying completeness, by a large number of third-party and generic ("brandless") thermal receipt printers that advertise "ESC/POS compatibility." Both impact (dot-matrix receipt) and thermal receipt mechanisms use it.

Support is not uniform: a given model implements a subset of the command set, so Epson publishes per-model technical reference guides, and operating-system APIs expose capability checks before sending optional commands (for example, verifying bold or double-size support first). Identical byte streams can therefore behave differently across devices.

Relationship to operating systems

Operating systems generally treat ESC/POS as a payload to pass through rather than a format they render:

  • Windows exposes POS printers through the Windows.Devices.PointOfService API. Microsoft documents that basic printing uses Print and PrintLine, but that to obtain certain formatting or to send specific commands, you must use ESC/POS commands built as a string and sent to the printer. Historically, OPOS and POS for .NET service objects served the same role.
  • On Linux and Unix with CUPS, because thermal POS printers use ESC/POS commands and do not understand PDF or PostScript, the common approach is to install them as raw or pass-through queues, or to use community CUPS filters and drivers (such as rastertoescpos and its derivatives) that convert CUPS raster graphics into ESC/POS bit-image data.
  • Cross-platform applications frequently bypass operating-system print formatting entirely and write ESC/POS over USB, serial, Bluetooth, or TCP sockets.

Relationship to PDF / PostScript / drivers

ESC/POS is conceptually opposite to PostScript and PDF. PostScript and PDF are device-independent page-description languages that describe a full page's geometry and typography for a raster image processor. ESC/POS is a device-dependent, stateful control stream for a specific class of narrow-format printers; the printer has no PostScript or PDF interpreter.

Where a conventional printer relies on a driver to convert an application's output into the printer's language, ESC/POS work is often done by the application or a POS SDK directly, with the "driver" acting mainly as a raw conduit. When graphics richer than the built-in fonts and barcodes are needed, content is rasterized to a monochrome bitmap on the host and sent via ESC/POS bit-image or graphics commands.

Modern use

ESC/POS remains a dominant command language for receipt printing in retail, hospitality, and services worldwide, spanning traditional terminals, tablet and mobile POS, and cloud or web POS. Microsoft notes that most modern printers support ESC/POS, and it is widely adopted by compatible third-party thermal printers.

Epson layered network- and web-oriented interfaces on top of it — for example ePOS-Print, an XML over HTTP interface that carries ESC/POS-class instructions to network printers — so browser and server-side applications can drive receipt printers without a local driver. Numerous open-source libraries across Python, JavaScript/Node, PHP, and Java generate ESC/POS byte streams, and generic thermal printers continue to ship with ESC/POS as their baseline command set.

Advantages

  • Ubiquity and portability: one command vocabulary targets Epson TM printers and many compatible devices, and software written for one model ports readily across a line.
  • Low host overhead: compact byte-level commands, with the printer handling formatting, reduce host processing — an explicit Epson design goal.
  • Fast and immediate: line-by-line printing in standard mode suits continuous receipts and real-time transactions.
  • Purpose-built features: emphasis and size, code pages and international characters, barcodes and 2-D codes, stored logos, paper cut, and peripheral control (cash drawer, customer display) are first-class.
  • Transport-agnostic: works over serial, USB, Bluetooth, and TCP, and via layered interfaces such as ePOS-Print.

Limitations

  • Not a page-description language: there is no device-independent typography or layout, so complex or graphic-heavy output must be rasterized to bitmaps on the host.
  • Proprietary and versioned: it is Epson-owned and periodically revised, with no open, vendor-neutral governing standards body.
  • Uneven "compatibility": third-party "ESC/POS-compatible" printers implement differing subsets, so identical byte streams can behave differently across devices; per-model reference guides and capability checks are needed.
  • Stateful and low-level: modes and residual state (page versus standard mode, active formatting) make it more error-prone than declarative formats, and initialization with ESC @ is often required.
  • Limited native fonts and graphics: built-in fonts and character sets are constrained, so custom fonts, logos, and images rely on downloaded or non-volatile (NV) graphics or raster images.
  • ESC/P and ESC/P2 — Epson's earlier control language for dot-matrix and later inkjet printers; the ancestor of ESC/POS, originating with the MX-80 in 1980.
  • OPOS, UnifiedPOS, POS for .NET, and JavaPOS — retail peripheral API standards that provide device abstraction above raw command sets like ESC/POS.
  • Epson ePOS-Print and ePOS-Device — Epson's XML over HTTP network interfaces for driving ESC/POS-class printers over web protocols.
  • Vendor emulations — some non-Epson POS printers document an ESC/POS emulation mode alongside their own command sets.
  • General print-pipeline peers, for contrast rather than equivalence: PostScript, PDF, and PCL are page-description and printer languages for general document printing, and IPP and CUPS are general print transport and spooling systems.

Timeline

  1. 1980

    Epson ships the MX-80 dot-matrix printer, introducing the ESC/P escape-code control language that later underpins ESC/POS.

  2. June 8, 1990

    Seiko Epson files the U.S. "ESC/POS" trademark application (Serial No. 74067215) for POS printers and POS software.

  3. August 18, 1992

    The "ESC/POS" trademark is registered (Reg. No. 1709195), owned by Seiko Epson.

  4. 1990s–present

    ESC/POS becomes the command set for Epson's TM-series receipt printers (such as the TM-T88 thermal line) and is widely adopted by compatible third-party thermal printers.

  5. 2010s

    Epson introduces network and web interfaces (ePOS-Print XML) layering HTTP and XML delivery over ESC/POS-class instructions.

  6. Ongoing

    The ESC/POS Command Reference is maintained and revised (Microsoft documentation links Revision 2.60), and modern operating systems drive ESC/POS printers via the Windows PointOfService API and Linux/CUPS raw queues and community filters.

Frequently asked questions

What does ESC/POS stand for?
It is commonly given as "Epson Standard Code for Point of Sale." This expansion is corroborated by third-party references rather than a primary Epson document; the related ESC/P stands for "Epson Standard Code for Printers."
Is ESC/POS an open standard?
No. ESC/POS is a proprietary command system owned by Seiko Epson ("ESC/POS" is a registered trademark, Reg. No. 1709195) and is periodically revised. There is no open, vendor-neutral governing standards body for it, though it is widely treated as the de facto command set for receipt printing.
How is ESC/POS different from PostScript or PDF?
PostScript and PDF are device-independent page-description languages describing a full page's geometry and typography. ESC/POS is a device-dependent, stateful byte-level control stream for narrow-format receipt printers; the printer has no PostScript or PDF interpreter, so richer graphics must be rasterized to a bitmap on the host and sent via ESC/POS image commands.
Do all thermal printers support the same ESC/POS commands?
No. Third-party "ESC/POS-compatible" printers implement differing subsets of the command set, so identical byte streams can behave differently across devices. Epson publishes per-model technical reference guides, and OS APIs expose capability checks before sending optional commands.
Which control characters begin an ESC/POS command?
Commands begin with a control byte — most commonly ESC (ASCII 27, 0x1B) or GS (ASCII 29, 0x1D) — followed by a command identifier and any parameters. For example, `ESC @` initializes the printer and `ESC E` with 0x01 turns bold on.

Source transparency (7 sources)

These references support claims made in this entry. The archive uses verified institutional and public-domain sources only; see Source policy.

Sources consulted (7)

Continue in the archive

Related reading