Sign In
Products
ZPL ViewerBarcode GeneratorImage → ZPLZPL cheat sheetLabel DesignerTemplate Gallery
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutions
Tools
ZPL Diagnostics HubZPL DebuggerSize & DPI AnalyzerDPI ConverterBarcode fit calculatorShipping Label AnalyzerFont InspectorOrientation DebuggerCalibration AssistantPrinter Compatibility CheckerBarcode Readability CheckerPrinter Language DetectorThermal Printer Test PackZPL ToolsEPL ToolsTSPL ToolsCPCL ToolsPrinter Language ConverterAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›Guides›ZPL vs TSPL: what actually differs

ZPL vs TSPL: what actually differs

Published: · Updated:

ZPL (Zebra) and TSPL (TSC and compatibles) solve the same problem — describe a label to a thermal printer — and look superficially alike: coordinates, fonts, barcodes, a print command. The differences that cost you an afternoon are not stylistic; they are in units, job structure and how each language names the same object.

The one difference that breaks ports: units

ZPL is dots, always. ^PW812 is 812 dots, which is 4 inches at 203 dpi and 2.7 inches at 300 dpi — the same file means a different physical size on a different printer.

TSPL takes real units at the top: SIZE 100 mm, 150 mm is millimetres, and an unitless SIZE 4, 6 means inches. Inside the label, coordinates are still dots. So a TSPL job declares its physical size and positions in dots, while a ZPL job expresses both in dots and leaves the physical size implicit in the media.

Porting a layout by copying coordinates therefore works only when both printers run the same density. Convert the geometry, not the numbers.

Side by side

ConceptZPLTSPL
Job boundaries^XA … ^XZ CLS … PRINT 1
Label size^PW812, ^LL1218 (dots)SIZE 100 mm, 150 mm (real units)
Media gapPrinter-side setting GAP 3 mm, 0 mm in the job
Text^FO100,100^A0N,40,40^FDHELLO^FS TEXT 100, 100, "3", 0, 1, 1, "HELLO"
Barcode^BY3^FO100,200^BCN,100,Y,N,N^FD123456^FS BARCODE 100, 200, "128", 100, 1, 0, 3, 3, "123456"
QR code^FO100,400^BQN,2,6^FDQA,https://…^FS QRCODE 100, 400, M, 6, A, 0, "https://…"
Box / line^GB700,400,4^FS BOX 40, 40, 760, 400, 4 / BAR x, y, w, h
Copies^PQ3second argument of PRINT 1, 3

Two structural notes fall out of the table. TSPL commands are line-oriented with comma-separated arguments and quoted strings; ZPL is a caret-prefixed stream where a field ends at ^FS. And TSPL puts media handling (SIZE, GAP) inside the job, where ZPL mostly leaves it to the printer's configuration.

Which one should you use?

The printer decides, not taste. A Zebra prints ZPL and nothing else; a TSC, an HPRT, or one of the many TSC-compatible clones prints TSPL natively. You do not pick a language and then look for a printer — you read the model number and the language follows. The one exception worth checking is TSC's ZPL emulation: many TSC models accept a ZPL stream when switched to that mode, so an existing ZPL label base can often stay as it is. Whether a given model offers it, and how the switch is made, is in the ZPL on TSC printers guide.

Two rules save the most time. First, do not mix: a job is either a ^XA…^XZ block or a CLS…PRINT sequence, and a printer that receives the other one prints it as text or discards it. Second, keep one source of truth per fleet — if half the printers are Zebra and half are TSC, generate both outputs from the same template geometry in millimetres rather than maintaining two hand-edited files. The TSPL hub collects the command reference and the TSPL viewer; the ^PW and ^LL pages explain the dot-based label size that the port has to translate into SIZE. If your other printer language is EPL rather than ZPL, the TSPL vs EPL guide covers that pair.

Three mistakes when porting

  1. Copying dot coordinates across densities. A layout built for 203 dpi lands at roughly two-thirds scale on a 300 dpi head. Recompute from millimetres, not from the old numbers.
  2. Forgetting that the field terminator disappears. ZPL's ^FS has no TSPL equivalent — a TSPL line is complete in itself. Porting the other way, a missing ^FS silently swallows the following commands into the previous field's data.
  3. Assuming barcode parameter order carries over. Both languages take height, human-readable flag, rotation and module widths, but in different positions, and the type is a quoted string in TSPL versus a distinct command in ZPL (^BC, ^BE, ^B3).

Command equivalents: ZPL, TSPL and EPL

The same job in three dialects. Positions and sizes are not interchangeable — ZPL and EPL count dots, TSPL sizes the label in millimetres or inches — so use the table to find the command, then re-measure.

ConceptZPLTSPLEPL
Start / end a label^XA … ^XZCLSN
Label width^PWSIZEq
Label length^LLSIZEQ
Gap between labels^MNGAPQ
Black-mark media^MNMBLINE*— no native command
Origin offset^LHREFERENCER
Text field^FO + ^A + ^FDTEXTA
Linear barcode^BY + ^BCBARCODEB
QR code^BQQRCODE— no native command
Box^GBBOXX
Filled line^GBBARLO
Copies^PQPRINTP
Print orientation^PODIRECTION*ZT* / ZB*
Darkness^MDDENSITY*D*
Print speed^PRSPEED*S*
Character set^CICODEPAGE*I*

* Parsed but not drawn by the Labelixa preview for that language — the printer still applies it.

What our previews actually render

Both languages are rendered by separate engines here, and each has a documented scope. On the TSPL side, geometry and content commands draw — SIZE, GAP, CLS, TEXT, BARCODE, QRCODE, BOX, BAR, REFERENCE, PRINT — while printer-behaviour commands are recognised but deliberately not drawn: DIRECTION, OFFSET, BLINE, DENSITY, SPEED, SET and CODEPAGE change physical output a screen cannot reproduce. The TSPL barcode set covers Code 128, Code 39, EAN-13 and UPC-A.

Paste either language into its viewer to see this in practice: the ZPL viewer or the TSPL viewer. If you are not sure which language a file is written in, the language detector classifies it from the code itself.

Frequently asked questions

What is the main difference between ZPL and TSPL?

Units and job structure. ZPL expresses everything in dots (^PW812 is 812 dots), while TSPL declares the physical label in real units (SIZE 100 mm, 150 mm) and positions in dots. A ZPL job runs from ^XA to ^XZ; a TSPL job clears the buffer with CLS and commits it with PRINT.

Can I convert a ZPL label to TSPL by copying coordinates?

Only when both printers run the same resolution. Dot coordinates carry no physical size, so a 203 dpi layout lands at roughly two-thirds scale on a 300 dpi head. Recompute the geometry from millimetres instead.

Should I use ZPL or TSPL?

Use the language your printer speaks natively: Zebra printers take ZPL, TSC and TSC-compatible printers take TSPL. Many TSC models also offer a ZPL emulation mode, so an existing ZPL label base can often be kept; check the model's manual. Never mix the two in one job.

Related guides

ZPL vs CPCL: desk printers and mobile units

Which to use: ZPL unless the printer is a CPCL mobile unit. Side-by-side command table, how to check and switch the printer language, and how to port a label.

Arabic text prints reversed or broken in CPCL

Arabic or Hebrew sent with CPCL TEXT can print reversed or with disconnected letters. Why it happens and three ways to print right-to-left text.

TSPL vs EPL: migrating off a legacy fleet

Moving from EPL printers to TSC hardware: what the two languages share, what has no counterpart, and how to test the migration.

Previewing and debugging CPCL without a printer

Mobile printer labels rendered in the browser: the session header that controls everything, the findings that matter, and what is not drawn.

Try your own ZPL code →