← Receipt Maker Open the generator

ESC/POS thermal printers: how they work and which one to buy

Every receipt printer you can buy speaks the same language, a command set Epson published in the 1990s called ESC/POS. Understanding roughly how it works turns "why is my receipt garbled" from a mystery into a two minute fix, and it tells you exactly which specification lines matter when you are choosing a printer.

Updated 3 August 2026 · about 7 minutes

What ESC/POS actually is

A receipt printer is not a page printer. It does not receive a rendered image of a page, it receives a stream of bytes: text to print, interleaved with short escape sequences that change how the following text behaves. The name comes from the escape character, 0x1B, that starts most of them.

ESC @          1B 40        reset the printer
ESC a 1        1B 61 01     centre the following lines
ESC E 1        1B 45 01     bold on
GS  ! 0x11     1D 21 11     double width and height
ESC d 4        1B 64 04     feed 4 lines
GS  V 0        1D 56 00     cut the paper

That is the whole model. You send "reset, centre, double size, the shop name, normal size, left align, the item lines, feed, cut" and paper comes out. It is why receipt printing is fast and why it has survived thirty years unchanged: there is almost nothing to go wrong.

Why you get 32 or 48 characters per line

The print head is a row of heating elements, and the number of them is fixed. At 203 dpi, which is what nearly everything uses, that is 384 elements on a 58 mm printer and 576 on an 80 mm one.

The built in font, Font A, is a 12 dot wide character cell. 384 ÷ 12 = 32, and 576 ÷ 12 = 48. Switch to the condensed Font B at 9 dots and you get 42 and 64 columns instead, in noticeably smaller text. This is a hard physical limit, not a setting. If your line is 33 characters on a 58 mm printer, the 33rd wraps to the next line.

This is the single most useful number to know when you are formatting receipts programmatically. Build every line as a fixed width string, pad the middle with spaces so the price lands flush right, and your columns will line up on any printer of that width.

Choosing an interface

Pick this first, because it decides more than the brand does.

What to check before you buy

  1. Roll width. 80 mm for a shop or restaurant, 58 mm for a market stall, a taxi or anywhere space is tight. You cannot change your mind later without buying different paper.
  2. ESC/POS compatibility, stated explicitly. Almost everything supports it. The few that do not are a nightmare, so check the listing says so.
  3. Auto cutter. Worth the extra money the moment you print more than about twenty receipts a day. Tearing against a serrated edge gets old fast.
  4. Print speed. Anything from 200 mm/s up is fine. Below about 90 mm/s you will feel the wait at a busy counter.
  5. Drop-in paper loading. Cheap printers make you thread the roll. Good ones let you drop it in and close the lid. This matters more than any spec sheet number.
  6. Cash drawer port. An RJ11 socket labelled DK. If you will ever want a drawer, get it now, because the printer is what opens it.

Which printers are safe buys

These are search links, not endorsements of a specific listing. Check the seller and the roll width before you order.

Fixing the four problems everyone hits

The receipt prints as a wall of symbols

The printer is being sent something it does not understand, usually a raw PDF or a page image. Either install the vendor driver and print through it, or send it plain text and ESC/POS bytes. There is no middle ground.

Accented characters come out wrong

ESC/POS predates Unicode. The printer holds a set of single byte code pages and you select one with ESC t n. For Czech, Polish or Hungarian you want code page 852 or Windows-1250, and you must encode your text to match. Sending UTF-8 to a printer expecting 852 produces exactly the mojibake you are looking at.

The paper comes out blank

Thermal paper only prints on one side. Nine times out of ten the roll is in upside down. Scratch the paper with a fingernail: the side that leaves a dark mark is the side that faces the head.

The print fades after a few months

That is thermal paper doing what thermal paper does, especially in heat or sunlight. It is a reason to keep a digital copy of anything that matters, and a reason receipts increasingly carry a QR code pointing at one.

Printing without writing any code

Free receipt generator with real thermal widths

Set the template to 58 mm or 80 mm and print straight from the browser at 1:1, or take the plain text export in true 32 or 48 column width and pipe it to the printer yourself. Barcodes, QR codes and the VAT summary are all generated offline.

Open the receipt generator

Written by Oliver Žaigla, who builds software for a living. The generator is free, with no account and no upload. If it helped, buy me a coffee. If you need one of these built properly, write to oliver@zaigla.com.