ESC/POS receipt viewer

Debug thermal printer output without wasting paper. Load an ESC/POS stream and see the receipt next to every decoded command, with offsets and raw bytes.

Receipt preview


The receipt appears here. Open a file, paste hex or Base64, or load the sample.

Decoded commands

The receipt appears here. Open a file, paste hex or Base64, or load the sample.

Supported commands

Printer controlESC @
Text0x20 to 0x7E, 0xA0 and up (UTF-8)
LayoutESC a
TypographyESC !, GS !, ESC E, ESC -
Paper feedLF, CR, ESC d, ESC J
Line spacingESC 3, ESC 2
CutGS V
Column imageESC * (8 and 24 dot stripes)
Raster imageGS v 0, GS ( L
QR codeGS ( k (model, size, error correction, store, print)
BarcodeGS k (UPC-A, UPC-E, EAN13, EAN8, CODE39, ITF, CODABAR, CODE93, CODE128)

Runs in your browser. Nothing you enter is sent anywhere. Your settings stay on this device for next time.

How to use it

  1. Drop a .bin, .escpos or .prn file, or paste the bytes as hex or Base64. No data? Load the sample receipt.
  2. Read the receipt preview on the left and the decoded command list on the right; pick 58 mm or 80 mm paper if the width looks wrong.
  3. Click a command to highlight it on the receipt, or click the receipt to find its command. Print the preview or download the bytes.

About this tool

ESC/POS is the command language most receipt printers speak. When a logo comes out clipped or a line is missing, the cause is somewhere in the bytes your software sent. This viewer decodes the stream command by command (initialize, text, alignment, bold, underline, font size, feeds, line spacing, cut, ESC * and GS v 0 images, GS ( L graphics, barcodes and QR codes) and draws a receipt that approximates the printed result.

Anything it cannot decode is listed as unsupported with its raw hex, never dropped. Text is read as UTF-8, so text in printer code pages may show odd characters. Barcodes and QR codes are drawn as placeholders: their data is shown in the command list.

The viewer is open source under the MIT license. Amin built it first for his own testing; the code is on GitHub, and new commands are welcome there. Everything runs in your browser: the file is never uploaded.

Questions and answers

Which ESC/POS commands are supported?

ESC @, ESC a, ESC !, ESC E, ESC -, ESC d, ESC J, ESC 3, ESC 2, ESC * column images, GS !, GS V, GS v 0 raster images, GS ( L graphics, GS k barcodes and the GS ( k QR code steps, plus text, LF and CR. The full list is in the Supported commands panel.

Can I paste data from an API or a log?

Yes. Choose Hex to paste bytes like 1B 40 48 65 6C 6C 6F (spaces, commas and line breaks are ignored), or Base64 for the strings many cloud print APIs return. What you paste is kept in this browser for next time.

Why does the QR code in the preview not scan?

The preview draws a placeholder where the printer would print the QR code or barcode. The stored data is decoded exactly, so check it in the command list.

Is my receipt data uploaded?

No. Decoding and drawing happen in your browser and nothing is sent to a server. Files you open are not stored; pasted hex or Base64 stays only in this browser.

All tools