ESC/POS Receipt Generator Online

Turn a receipt (items, totals, QR, barcode) into ESC/POS bytes for 58 / 80 mm thermal printers, with Vietnamese printed as an image and a PNG preview.

Free tool: 20 requests per minute.

Result

Press “Run” to see the result.

Describe the receipt as blocks (text with align / bold / size / underline / invert, row with left and right text, divider, feed, qr, barcode (Code 128, EAN-13, Code 39), image (PNG / JPEG, dithered)) or as a simple receipt object (store, header, title, info, items with name / qty / price, discount, vat, total, paid, qr, footer) and get the ESC/POS byte stream (base64) plus a PNG preview of exactly what will print.

Thermal printers sold in Vietnam often have no Vietnamese code page, so mode=raster (default) draws all text with the Be Vietnam Pro font and sends the receipt as a GS v 0 bit image: diacritics print correctly on any ESC/POS printer. mode=tcvn3 sends native text in the TCVN-3 code page (ESC t 30, Epson-compatible printers; faster, but toned capitals are missing), mode=ascii removes diacritics. In the text modes QR codes and barcodes use the printer’s own commands. cut (default on) adds a partial cut, open_drawer=true kicks the cash drawer.

APIBox cannot reach a printer on your network: send the bytes yourself through WebUSB, Web Bluetooth, a TCP socket to port 9100, or the RawBT app on Android. format=bin returns the raw bytes, format=png the preview only.

Use this in your code

curl -X POST "https://apibox.io.vn/v1/escpos-receipt" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"paper":"58","receipt":{"store":"Quán Cà Phê","items":[{"name":"Cà phê sữa đá","qty":2,"price":29000}],"paid":100000,"footer":"Cảm ơn quý khách!"}}'

API documentation → Get a free API key

FAQ

Why does Vietnamese print as question marks on my printer?

The printer has no Vietnamese code page. Use mode=raster (the default): the text is printed as an image, which every ESC/POS printer supports.

Which printers are supported?

Any ESC/POS-compatible 58 mm (384 dots) or 80 mm (576 dots) printer, e.g. Epson TM, Xprinter, Gprinter, Rongta, Sunmi.

Can APIBox print directly?

No, a cloud API cannot reach your LAN or USB. Send the returned bytes to the printer from your app, browser or a print relay.