SBPL Preview logo SBPL Preview

SBPL Guide & Examples

A concise, practical reference for SBPL — SATO Barcode Programming Language, the language SATO thermal printers use to lay out labels. Copy any example below into the previewer and see it render instantly — no SATO printer required.

Open the previewer →

What is SBPL?

SBPL is a command language for SATO label printers. A label is a stream of commands, each introduced by the ESC control character (byte 0x1B). Commands set the cursor position, choose a font, and print text, barcodes, lines or boxes. Coordinates and sizes are in dots; how big a dot is depends on the printer resolution (203, 305 or 609 dpi — e.g. 203 dpi = 8 dots/mm).

Because control characters are invisible, this previewer shows them as readable chips like <ESC> and <GS>. You can paste raw bytes, \x1B-style escapes, or the <ESC> tokens — all are accepted, and Copy SBPL / Download .sbpl give you back the real bytes.

Quick start

  1. Paste your SBPL into the editor (or pick a built-in Sample).
  2. Choose your printer model and DPI so sizes are correct.
  3. Read the live preview; use Format to tidy the code, Export PNG to save an image.

Command reference

CommandMeaningExample
<ESC>AStart of label<ESC>A
<ESC>ZEnd of label<ESC>Z
<ESC>HnnnnHorizontal position (X) in dots<ESC>H0060
<ESC>VnnnnVertical position (Y) in dots<ESC>V0010
<ESC>LhhvvMagnification: horizontal ×hh, vertical ×vv<ESC>L0202 = 2× / 2×
<ESC>%nRotation: 0=0°, 1=90°, 2=180°, 3=270°<ESC>%1
<ESC>S / U / M textPrint text in a bitmap font (5×9 / … / 13×20 dots)<ESC>SHELLO
<ESC>X<sel> textPrint text in an X-series device font (XU, X21–X24…)<ESC>XUPATT:
<ESC>$A,w,h,r + <ESC>$=textScalable outline font: set width, height, rotation, then print<ESC>$A,35,35,0<ESC>$=NAME
<ESC>FWtt[Hnnn][Vnnn]Line / box: thickness, then H length and/or V length<ESC>FW02H0400 (line)
<ESC>BG… Code128 barcode (narrow, height, mode, data)<ESC>BG02060>B12345678
<ESC>BK…PDF417 2D barcode<ESC>BK…data
<ESC>B1…*data*Code39 (B0=Codabar, B2=ITF, B3=EAN13, B4=EAN8)<ESC>B102100*ABC123*
<ESC>2D30 / 2D50QR Code / DataMatrix (also 2D10 PDF417, 2D20 MaxiCode)<ESC>2D3006HELLO
<ESC>QnPrint quantity<ESC>Q1

Note: some parameter details vary by SATO model/firmware; the previewer flags anything it cannot interpret in its Diagnostics panel.

Examples

1. Text & fonts

<ESC>A
<ESC>H0050<ESC>V0050<ESC>L0202<ESC>SHELLO SBPL   # bitmap font, 2× size
<ESC>H0050<ESC>V0130<ESC>$A,48,48,0<ESC>$=Outline Font   # scalable font
<ESC>Z

2. Barcodes (1D + 2D)

<ESC>A
<ESC>H0050<ESC>V0040<ESC>BG02060>B12345678   # Code128
<ESC>H0050<ESC>V0180<ESC>2D3006HELLO-QR   # QR code, module 6
<ESC>H0330<ESC>V0180<ESC>2D5006DATA123   # DataMatrix
<ESC>Z

3. Lines & boxes

<ESC>A
<ESC>H0040<ESC>V0060<ESC>FW02H0400          # horizontal line, 400 dots long
<ESC>H0040<ESC>V0100<ESC>FW0303H0200V0120  # box 200×120, 3-dot border
<ESC>Z

Paste any of these into the previewer to see them render.

Barcodes supported

1D: Code128, Code39, ITF (Interleaved 2 of 5), EAN-13/8, UPC-A, Codabar, Code93, GS1-128.   2D: PDF417, QR Code, DataMatrix, MaxiCode, Aztec, MicroPDF417.

FAQ

Do I need a SATO printer to preview SBPL?
No. This tool parses SBPL and renders the label in your browser, replacing the printer's command-preview feature.
Is my label data uploaded anywhere?
No. Parsing and rendering happen entirely in your browser; nothing is sent to a server.
How do I type the ESC character?
Paste raw SBPL and it is converted automatically, or use the <ESC> insert buttons in the editor.
Will the preview match my printer exactly?
Layout, sizes, positions and barcodes match closely (using SATO's documented font dot-dimensions). Glyph shapes are an approximation of SATO's built-in fonts.