Blog

ESC/POS Cut Paper and Open Cash Drawer Commands (With Examples)

27 October 2026 · 6 min read · By the Raw Print team

To cut the paper on an ESC/POS receipt printer, send GS V 65 n (1D 56 41 n), which feeds the paper n dots up to the blade and then cuts. To open a cash drawer connected to the printer, send ESC p 0 25 250 (1B 70 00 19 FA), which sends a 50 ms pulse to drawer pin 2. The details below explain every variant, how the drawer is wired, and what to do when nothing happens.

Copy-paste bytes:

  • Feed and full cut: 1D 56 41 10
  • Feed and partial cut: 1D 56 42 10
  • Cut now (full): 1D 56 00
  • Open drawer, pin 2: 1B 70 00 19 FA
  • Open drawer, pin 5: 1B 70 01 19 FA

The paper cut command: GS V

The cutter sits a little above the print head, so the last printed line is still inside the printer when printing ends. That's why the variants that feed first are the ones you want in practice.

CommandHexEffect
GS V 0 or GS V 481D 56 00 / 1D 56 30Full cut at the current position, no feed.
GS V 1 or GS V 491D 56 01 / 1D 56 31Partial cut (one small tab left attached).
GS V 65 n1D 56 41 nFeed paper to the cutting position plus n dots, then full cut.
GS V 66 n1D 56 42 nFeed to the cutting position plus n dots, then partial cut.

Full or partial cut?

  • Partial cut leaves the receipt hanging by a small tab, so it doesn't drop on the floor or into the printer. Most shops prefer it.
  • Full cut separates the receipt completely. Good for kiosks and printers with a presenter.

Some printers support only one type and treat the other as the same cut.

How much to feed

Without a feed, the cut slices through or very close to your last line. Either use GS V 65 n / GS V 66 n, or feed a few lines yourself with ESC d 3 (1B 64 03) before GS V 0. Start with n = 16 dots (2 mm) and adjust until the receipt has a tidy bottom margin without wasting paper.

Printers without a cutter

Most portable 58 mm printers have no cutter, only a tear bar. They ignore GS V, so the command is harmless, but you need to feed enough paper (ESC d 4 to ESC d 6) for the last line to clear the tear bar. You can find out whether a printer has a cutter with GS I 2, the "type ID" query, on printers that reply.

The cash drawer command: ESC p

A cash drawer doesn't connect to your computer or tablet. It plugs into the receipt printer's drawer port (labelled DK, DRAWER or CD), usually an RJ11 or RJ12 socket that looks like a phone jack. When the printer receives ESC p, it sends a short 24-volt pulse down the cable, which releases the drawer's solenoid and the drawer springs open.

ESC p  m  t1  t2
1B  70 m  t1  t2

m  = 0 → pulse on drawer pin 2 (connector pin 2)
m  = 1 → pulse on drawer pin 5
t1 = ON time  in units of 2 ms   (25  → 50 ms)
t2 = OFF time in units of 2 ms   (250 → 500 ms)

1B 70 00 19 FA (pin 2, 50 ms on, 500 ms off) opens nearly every standard drawer. Some drawers need a longer pulse; try t1 = 50 (32) or 100 (64) if the latch clicks but doesn't release.

Pin 2 or pin 5? Most single drawers use pin 2. Some printers support two drawers, one on each pin. If m = 0 does nothing, try m = 1. Some printers also accept the real-time command DLE DC4 1 m t (10 14 01 m t), which opens the drawer immediately, even mid-job.

Examples in four languages

Python (raw bytes or python-escpos)

import socket

job = (b"\x1b@" + b"Thank you!\n"
       + b"\x1dVA\x10"             # feed 16 dots, full cut
       + b"\x1bp\x00\x19\xfa")       # open drawer, pin 2

with socket.create_connection(("192.168.1.50", 9100)) as s:
    s.sendall(job)

# or with python-escpos:
from escpos.printer import Network
p = Network("192.168.1.50")
p.text("Thank you!\n")
p.cut()          # mode="PART" for a partial cut
p.cashdraw(2)    # or 5

JavaScript (receipt-printer-encoder)

const bytes = new ReceiptPrinterEncoder({ language: 'esc-pos' })
  .initialize()
  .line('Thank you!')
  .cut('partial')
  .pulse(0, 100, 500)   // device (0 = pin 2), on ms, off ms
  .encode();

PHP (escpos-php)

$printer->text("Thank you!\n");
$printer->cut();       // Printer::CUT_PARTIAL for a partial cut
$printer->pulse();     // pin 2 by default; pulse(1) for pin 5
$printer->close();

C# (ESC-POS-.NET)

var e = new EPSON();
printer.Write(ByteSplicer.Combine(
    e.PrintLine("Thank you!"),
    e.FullCutAfterFeed(4),
    e.CashDrawerOpenPin2()
));

More on these libraries in ESC/POS in PHP, Java, C# and Flutter and ESC/POS in JavaScript.

Cut first or open the drawer first?

Put the drawer pulse at the end of the job, after the cut. The printer works through commands in order, so the drawer opens as the receipt finishes and the cashier can hand over change and receipt together. For refunds or "no sale", send only ESC @ and the drawer pulse, with nothing to print.

On Android, Raw Print has switches for automatic paper cut and open cash drawer after each receipt, so receipts from the Print menu, the share menu or a web POS link cut and open the drawer without any code. If your POS already sends these commands in raw ESC/POS, Raw Print passes them through unchanged.

Troubleshooting

The paper doesn't cut

  • Check the printer has a cutter: desktop 80 mm printers usually do, portable 58 mm printers usually don't.
  • Check the cutter isn't disabled in the printer's settings (some utilities can switch it off).
  • Make sure the job is actually sent in full; some drivers only flush on the next job.

The cut slices through the last line

Use GS V 65 n with a larger n, or add ESC d 3 before cutting.

The drawer doesn't open

  • Check the cable goes into the printer's DK/drawer port, not the network or phone port.
  • Try pin 5 (m = 1) and a longer pulse.
  • Check the drawer isn't locked with its key.
  • Check the drawer's voltage matches the printer (most are 24 V; some drawers are 12 V).
  • Print a self-test: some printers show drawer settings there.

The drawer opens on every print, including reports

Your software adds the pulse to every job. Send it only with sale receipts, or turn off the global "open drawer" option and add the command per receipt type.

Frequently asked questions

What is the ESC/POS command to open a cash drawer?

ESC p m t1 t2. The common bytes are 1B 70 00 19 FA: pin 2, 50 ms pulse, 500 ms off time.

What is the difference between GS V 0 and GS V 65?

GS V 0 cuts immediately. GS V 65 n first feeds the paper to the cutter plus n dots, so the last printed line isn't cut through.

Can I open a cash drawer without printing?

Yes. Send just the drawer command (optionally after ESC @). The printer opens the drawer without feeding any paper.

Can a cash drawer connect directly to a tablet?

Standard printer-driven drawers can't; they take their pulse from the receipt printer. USB or Bluetooth drawers exist, but most POS setups use the printer's drawer port.