If you're developing software for thermal printers or customizing your POS system, understanding ESC/POS commands is essential. ESC/POS is the de facto standard command language used by nearly all thermal receipt printers worldwide, originally developed by Epson and now supported by most manufacturers.
What Are ESC/POS Commands?
ESC/POS is a set of control characters sent from your computer or POS software to the printer. These commands tell the printer how to format text, print barcodes, cut paper, open cash drawers, and more — all without any driver software.
Basic Text Formatting
- Bold: ESC E n (n=1 to enable, n=0 to disable)
- Underline: ESC - n (n=1 for single, n=2 for double)
- Font size: GS ! n (n=0x11 for double height and width)
- Alignment: ESC a n (n=0 left, n=1 center, n=2 right)
- Inverse: GS B n (n=1 for white text on black background)
Printing Barcodes
ESC/POS supports multiple barcode types through the GS k command:
- UPC-A: Type 65
- EAN-13: Type 67
- Code 128: Type 73
- Code 39: Type 69
- QR Code: GS ( k (function 167)
Hardware Control
- Cut paper: GS V m (m=0 full cut, m=1 partial cut)
- Open cash drawer: ESC p m t1 t2 (kick out pulse to open drawer)
- Feed paper: ESC d n (feed n lines)
- Initialize printer: ESC @ (reset all settings to default)
💡 Tip: Many programming languages have ESC/POS libraries that abstract the raw commands. For example, python-escpos for Python, escpos for Node.js, and EscPos for PHP. These libraries handle byte formatting and encoding for you.
📦 Printers with ESC/POS Support
Almost all of our thermal printers support ESC/POS commands, including the U80C (receipt), 5860III (receipt), and M60 (all in one POS). For advanced use cases, our printers also support TSPL for label-specific commands.
Browse All Products →
Getting Started
- Connect your printer via USB, LAN, or Bluetooth.
- Identify the connection port (COM port for Windows, /dev/ttyUSB for Linux, or network IP for LAN printers).
- Start with simple text: send "Hello World" with ESC @ (initialize) + ESC a 1 (center) + "Hello World" + LF + GS V 0 (cut).
- Gradually add formatting, barcodes, and hardware commands as needed.
For more detailed technical documentation, contact our support team with your specific printer model and development environment.