ZPL Command Reference
All 215 Zebra Programming Language commands — grouped by category with syntax, parameters, and examples.
Label Structure
^XASupportedThis is like pressing "New Document". Every ZPL label must begin with ^XA — it tells the printer "I'm about to describe a label".
^XZSupportedThis tells the printer "I'm done describing this label, go ahead and print it" — `^XZ` ends the format AND flushes the accumulated buffer to the print engine for execution.
^FSSupportedTerminates the current field — tells the printer "that field is complete, commit it to the label". Fields are NOT implicitly closed: most field commands (`^FD`, `^GB`, `^GE`, etc.) need an explicit `^FS` to end them.
^FXSupportedA comment — the printer completely ignores everything between ^FX and the next ^FS. Use it to add notes to your ZPL so other people (or future you) can understand what each section does.
Positioning
^FOSupportedSets where the next field is placed, **relative to the current `^LH`** (label home). x is how far from the label-home origin horizontally, y is how far down. Measured in printer dots — about 8 dots/mm at 203 dpi, 12 dots/mm at 300 dpi. With no `^LH` set, `^FO` is relative to the label corner.
^FTSupportedLike `^FO`, but `y` is the text **baseline** (where letter bottoms sit, with descenders extending below) instead of the **top-left** of the bounding box. With `^FO` at (100,100) the glyph top sits at 100; with `^FT` at (100,100) the glyph baseline sits at 100 and the body of the letters extends upward.
^LHSupportedShifts the origin for ALL subsequent positioning commands (`^FO`, `^FT`) by a fixed amount, in printer **dots**. If you set `^LH30,30`, then `^FO0,0` actually prints at (30,30). Like setting page margins — instead of changing every `^FO`, you offset the whole layout in one place.
^LSSupportedShifts the entire label left or right. Unlike ^LH which sets a home position, ^LS is specifically for horizontal adjustments — useful when the label stock is slightly misaligned in the printer.
^LTSupportedShifts the entire label up or down. The vertical equivalent of ^LS — for when labels are printing too high or too low.
Text & Fonts
^A0SupportedSelects the built-in scalable font and sets its size and rotation. This is the main font you'll use — it can be any size. The "0" is the font number (zero, not the letter O).
^ASupportedSelects one of the built-in bitmap fonts (A through V). Unlike `^A0` which scales smoothly, these are fixed-size pixel fonts — crisp at their native size but blocky when scaled. The orientation parameter (N/R/I/B = 0°/90°/180°/270°) is part of the syntax, not optional.
^CFSupportedSets the **global default** font and size for the rest of the label. Any text field that does not have its own `^A0`/`^A` override inherits the `^CF` setting. Persists until another `^CF` is encountered or the label ends.
^FDSupportedThe actual content — text to display, barcode data to encode, or an RFID payload to write. Everything between `^FD` and `^FS` is the data. When the field is preceded by `^FH`, the data may include hex-escape sequences (e.g. `\20` for space, `\0A` for newline) which the printer decodes into bytes.
^FWSupportedSets the default rotation for all fields on the label. If you set ^FWR, every field will be rotated 90° unless it has its own rotation set via ^A0.
^FBSupportedCreates a text box with automatic word wrapping inside a fixed width. The printer breaks the text into lines and renders up to the configured maximum — **any text past `lines` is truncated, not overflowed**, so undersized blocks silently drop content.
^FHSupportedDefines an **escape character** that the next `^FD` will use to introduce hex byte sequences. Default is underscore (`_`), but you can supply any single ASCII character as the argument (commonly `\`). Each escape pair (`_NN` or `\NN`) decodes to a single byte — letting you embed control characters (newline `_0A`, tab `_09`), special symbols (`_5E` for `^`, `_7E` for `~`), or non-ASCII bytes that the printer would otherwise treat as syntax.
^FNSupportedCreates a numbered placeholder in a stored label template. When you recall the template later, you fill in just the variable parts by their number — like mail merge in Word.
^FRSupportedInverts the colours — black becomes white and white becomes black. Put it before any field to make white text on a black background. Works with text, barcodes, and graphics.
^FPSupportedSets two field-level rendering tweaks for the next `^FD`: direction (horizontal, vertical, or reverse) and inter-character gap. Different from `^A`'s rotation parameter — `^FP` controls how characters within the field are arranged, while `^A`'s orientation rotates the field as a whole.
^TBSupportedA more modern version of ^FB. Creates a fixed-size text box with automatic word wrapping and rotation support. Preferred over ^FB on newer firmware.
^SNSupportedAutomatically increments a number across multiple labels. If you're printing 100 labels with sequential serial numbers, you don't need to send 100 separate labels — just one with ^SN and ^PQ.
^CISupportedSelects how the printer interprets the bytes inside subsequent `^FD` fields. Without `^CI`, non-ASCII characters render as garbled bytes whose appearance depends on the printer's default code page. `^CI28` (UTF-8) is the right choice for almost all modern multilingual labels.
^A@UnsupportedSelects a downloaded TrueType font by filename rather than the single-letter alias assigned with ^CW. Allows using any downloaded font directly.
^FCUnsupportedSets the field clock characters used for real-time clock (RTC) substitution in ^FD data. When the printer encounters these characters in text, it replaces them with the current date/time.
^FLUnsupportedDefines a fallback chain: when a glyph is missing from the **base** font, the printer falls back to the **linked** font for that glyph. Same idea as web `font-family` fallback. Multiple `^FL` calls chain — base → link 1 → link 2 → ... — so a Latin primary can fall back to a CJK font for Chinese characters and to a symbol font for currency, all in one render.
Graphics & Shapes
^GBSupportedDraws a rectangle. Thin and wide → horizontal line; thin and tall → vertical line; thick border → outlined box. **Fill rule:** when `t >= min(w, h)` the rectangle is rendered as a solid filled shape (handy for black bars and reverse-text backgrounds). Corner rounding (`r` 0-8) softens the corners — useful for badge-style headers.
^GCSupportedDraws a circle. You set the diameter and border thickness. Like ^GB, if the border is thick enough it fills solid.
^GDSupportedDraws a diagonal line inside a `w × h` bounding rectangle anchored at the current `^FO`. The `d` parameter picks which corner pair the line connects — `R` for top-left → bottom-right, `L` for top-right → bottom-left. The bounding box itself is not drawn; only the diagonal stroke.
^GESupportedDraws an ellipse (oval) inside a `w × h` bounding box. When `w == h` the result is a circle. **Fill rule:** mirrors `^GB` — when `t >= min(w, h) / 2` the printer renders a solid filled shape rather than a stroked outline. White (`c = W`) knocks out the underlying ink.
^GFSupportedEmbeds a 1-bit-per-pixel bitmap directly in the ZPL stream. Three encodings: **A** (ASCII hex — portable, ~2× larger), **B** (binary — smaller but printer must accept binary safely), **Z**/**C** (Zebra LZ77-compressed — smallest, ideal for slow links). You normally do not author this by hand — a converter (`zebra-image-converter`, ImageMagick + script, or rfid.me's image tool) turns a PNG / SVG / logo into the `^GF` data.
^GSSupportedPrints a single character from Zebra's built-in legal/regulatory symbol font (font `0` selector when paired with `^GS`). The actual glyph is chosen by the **single character** placed in the following `^FD` — for example `^FDA` → registered (®), `^FDB` → copyright (©), `^FDC` → trademark (™). Each printer firmware lists its specific letter→glyph mapping; the common four are A/B/C/D for ®/©/™ and the global "wash care" set on retail-ready models.
Barcodes
^BYSupportedSets the default size for all barcodes that follow. The "module width" controls how thick the thinnest bar is — bigger = easier to scan but takes more space. Set this once and it applies to all subsequent barcodes.
^BCSupportedThe most versatile 1D barcode — encodes any ASCII character (letters, numbers, symbols) using three subsets (A: control + uppercase, B: full ASCII, C: numeric-pair compression). Zebra firmware **auto-switches** subsets based on data content, so even-length numeric data automatically uses subset C and produces a noticeably narrower barcode than the same byte count of mixed text.
^B3SupportedAn older but very common barcode format. Standard Code 39 supports uppercase letters, digits, and a small symbol set (`- . $ / + % SPACE`). With the `e` parameter set to `Y`, **Extended Code 39** uses two-character sequences to encode the full ASCII set including lowercase and control characters — at the cost of doubling the symbol width per encoded character.
^BESupportedThe barcode on almost every product in a shop outside North America — the international version of UPC. **You supply 12 digits; the printer auto-calculates the 13th (check digit).** Numeric-only — letters or symbols cause the field to be rejected. The full GTIN-13 / EAN displayed below the barcode is 12 input + 1 calculated.
^BUSupportedThe standard barcode on products in the US and Canada. **You supply 11 digits; the printer calculates the 12th (check digit).** Numeric-only — any non-digit causes the field to be rejected. The full 12-digit UPC-A renders below the bars.
^BQSupportedThe square barcode you see everywhere — on menus, posters, and websites. QR codes encode URLs, text, contact info, or any data. The Zebra `^BQ` requires a **mode prefix in the `^FD` payload** — typically `LA,` (alphanumeric), `QA,` (mixed/automatic), or `LB,` (binary). Without a prefix, the printer firmware decides what to do — often producing a different (or invalid) barcode.
^BDUnsupportedA fixed-size circular 2D barcode used by UPS for shipping labels. Looks like a hexagonal pattern of dots inside a circle (very different from DataMatrix or QR). Always 1.11" × 1.054" — the size is fixed by the spec, not user-controlled.
^B7SupportedA 2D barcode that looks like a tall stack of tiny barcodes — stores up to ~1,800 characters. PDF417 is **tunable**: `security` (0-8), `columns` × `rows`, and `truncate` together set the trade-off between density and damage tolerance. Higher `security` recovers from more damage but enlarges the barcode; tighter `columns` keeps it tall and narrow; truncated mode drops the right-hand row indicators to save space at the cost of error recovery.
^BXSupportedA 2D barcode that looks like a small square grid of dots — compact, error-correcting, scannable from any rotation. The modern Data Matrix standard (ECC 200) — what GS1 recommends for healthcare and regulated industries. Supports **structured append** (one logical payload split across up to 16 linked symbols) for very long data, and **fixed sizing** via `c`/`r` for layouts where the symbol must hit a specific footprint. (Note: `^BD` is UPS MaxiCode, a different barcode type — not an older Data Matrix.)
^BOSupportedA 2D barcode with a distinctive bullseye centre pattern. Used on boarding passes and some transport tickets. Aztec doesn't need a quiet zone (white space around it), making it space-efficient.
^BASupportedAn improved version of Code 39 that's about 25% shorter for the same data. Less common than Code 128 but still used in some logistics and postal systems.
^B1SupportedA numeric-only barcode used primarily in telecoms for labelling telephone equipment. Very specialised — you probably won't need this unless you're in the telecom industry.
^B2SupportedA compact numeric-only barcode where pairs of digits interleave. Very space-efficient for numbers. Common in warehouse and distribution for case/pallet labels.
^B4UnsupportedA multi-row (stacked) barcode that encodes large amounts of data in a small space by stacking 2-8 rows of symbols. Each row is a separate linear barcode linked together.
^B5UnsupportedUSPS PLANET (Postal Alpha Numeric Encoding Technique) barcode used for mail tracking. Similar to POSTNET but includes both tall and short bars for encoding. Being phased out in favour of Intelligent Mail.
^B8UnsupportedThe compact 8-digit version of EAN-13, designed for small packages where a full-size barcode won't fit — think chewing gum, lipstick, or small batteries.
^B9UnsupportedA compressed version of UPC-A that encodes 6 digits (plus check digit) in roughly half the space. Used on very small items in US/Canadian retail.
^BBUnsupportedA stacked barcode based on Code 128. Each row is a full Code 128 barcode with linking characters. Encodes large amounts of data in a compact rectangular area.
^BFUnsupportedA compact version of PDF417 designed for small items. Encodes less data than full PDF417 but takes up much less space. Popular for healthcare and small component labelling.
^BIUnsupportedAn older numeric-only barcode used in industrial applications. Encodes digits using only the bars (not spaces). Less dense than Interleaved 2 of 5 but simpler.
^BJUnsupportedThe original 2 of 5 barcode — numeric only, low density. The simplest member of the 2-of-5 family. Rarely used in new applications.
^BKUnsupportedAlso known as NW-7, Monarch, or Code 2 of 7. A self-checking barcode that encodes digits plus six special characters. Widely used in libraries, blood banks, and FedEx airbills.
^BLUnsupportedLogistics Applications of Automated Marking and Reading Symbols — essentially Code 39 with a mandatory mod-43 check character. Required by the US Department of Defense for military logistics.
^BMUnsupportedA smaller version of QR Code designed for applications where space is extremely limited. Encodes less data than a full QR code but requires only one position detection pattern instead of three.
^BPUnsupportedA pulse-width modulated barcode developed in England. Used primarily in UK and European library systems and some retail shelf-edge labels. Encodes hexadecimal digits (0-9, A-F).
^BRUnsupportedFormerly known as RSS (Reduced Space Symbology). A family of compact barcodes designed by GS1 for small items. Can encode a full GTIN in less space than EAN/UPC and supports additional data like weight, expiry, and lot.
^BSUnsupportedPrints 2-digit or 5-digit supplemental barcodes that appear to the right of a UPC or EAN barcode. The 2-digit add-on is used for periodicals (issue number), the 5-digit add-on for books (suggested price).
^BTUnsupportedTelecoms Industry Forum 39 — a composite barcode combining Code 39 with a MicroPDF417 component. Used by the telecommunications industry for component marking.
^BZUnsupportedThe current USPS mail barcode, replacing POSTNET and PLANET. Encodes tracking number, routing code, and service type in a 65-bar barcode with 4 bar states (full, ascender, descender, tracker). Required for USPS automation discounts.
Label Config
^PWSupportedSets how wide the label is, in dots. At 203 DPI (the most common resolution), 1 inch = 203 dots. So a 4-inch label is ^PW812.
^LLSupportedSets how tall the label is, in dots. Combined with ^PW, this defines the total label size. At 203 DPI: 2" = 406 dots, 3" = 609 dots, 4" = 812 dots.
^POSupportedFlips the entire label upside-down. Useful when labels feed out of the printer in the wrong direction and you can't physically rotate the stock.
^LRSupportedReverses the entire label — everything that was black becomes white and vice versa. The entire label prints as white-on-black.
^MUSupportedChanges the measurement units from dots to inches or millimetres. Instead of calculating dots, you can say ^FO25,50 and mean millimetres. Makes ZPL much more readable.
^XBUnsupportedSuppresses the backfeed that normally occurs at the end of a label format. The label stays in its current position instead of backing up to the tear/peel position.
RFID
^RFSupportedReads from or writes to the **RFID inlay** embedded in a smart label, addressing a specific memory bank on a Gen2 tag. `o=W` (write — written `^RFW,…` in shorthand; this is **not a separate command**, just `^RF` with the operation parameter set to `W`) takes the data from the next `^FD` and **encodes it into the tag** during print — the printed media moves under the RFID encoder, the inlay is energised, the new value is committed; `o=R` (read — `^RFR,…`) **retrieves** the bank contents and stores them in the print field for use elsewhere in the format. The `b` parameter selects which Gen2 memory bank to address: `0` EPC (the scannable identifier — most common write target), `1` TID (Tag ID — read-only chip serial, factory-locked), `2` USER (free-form bytes, optional on the inlay), `3` RESERVED (kill and access passwords). Pair with a preceding `^RS` (RFID Setup) to declare the protocol/region/retry policy — `^RF` alone uses defaults that may not match the encoder.
^HLUnsupportedSends the printer's **RFID encoding event log** back to the host over the **same connection that issued the command** — TCP socket, USB serial, parallel, etc. Output is plain ASCII (one event per line) listing recent encode/read attempts, success/void status, and tag IDs as recorded in the printer's rolling RFID log buffer. **Nothing is printed on label media** — `^HL` is purely a diagnostic / fleet-management read-back, not a layout primitive. The host application reads the response off the same socket it wrote `^HL` into.
^HRUnsupportedRuns RFID antenna calibration to optimise the signal strength for the current label stock. The printer adjusts power levels for reliable encoding.
^RAUnsupportedReads or writes the Application Family Identifier (AFI) byte on an RFID tag. AFI categorises what the tag is used for (retail, transport, healthcare, etc.).
^RBUnsupportedConfigures the **memory-block geometry** the encoder uses for subsequent RFID operations. A "block" is the **fixed-bit unit of access** that the underlying Gen2 protocol opcodes (Write/BlockWrite/BlockErase/Lock) operate on — not arbitrary bytes. Setting `^RB` declares: how many bits in a block (`n`), where the first writable block starts (`b`), the per-bank read/write/lock policy (`r`/`m`/`w`). Most modern tags support per-word access (16-bit blocks) without `^RB`; `^RB` matters for older or specialised inlays whose firmware exposes blocks of 32/64/128 bits and refuses unaligned writes.
^REUnsupportedEnables or disables RFID functionality on the printer. When disabled, ^RF commands are ignored and no RFID encoding occurs.
^RIUnsupportedReads the unique Tag ID (TID) from the RFID chip. The TID is factory-programmed and cannot be changed — it uniquely identifies the chip itself.
^RLUnsupportedSets the position of the RFID inlay within the label, measured from the leading edge. Tells the printer where the antenna is so it encodes at the right moment during the print stroke.
^RMUnsupportedSets the RFID calibration mode — controls how the printer optimises encoding power. Auto mode lets the printer find the best power; manual mode uses a fixed value.
^RNUnsupportedSets how many void labels the printer will produce before stopping when an RFID tag fails to encode. Void labels are printed with "VOID" across them.
^RQUnsupportedQueries the RFID subsystem for its current status — reports tag presence, last operation result, error codes, and power levels.
^RRUnsupportedSets how many times the encoder will **re-attempt the read or write against the same physical tag** before declaring the operation failed. A "failure" is any of: (1) **read-back mismatch** — written value does not match what was just programmed (the most common failure mode, indicates a partial write or bad coupling), (2) **weak / no signal** — the inlay is missing, dead, or the antenna alignment is off, (3) **blank tag response** — the tag answers but reports no value where one is expected, (4) **protocol error** — Gen2 NACK or password failure on locked memory. **When all `n` attempts are exhausted**, the printer voids the label (paints the configured void pattern across it via `^MMV` settings or the global void style) and feeds the next blank tag, where a fresh attempt begins. The voided-label count then increments toward the `^RS` `e` ceiling — too many consecutive voids halt the printer.
^RSUnsupported**Configures the RFID encoder before any read or write** in the same label format. The first parameter `t` selects the **tag protocol** the encoder will use to talk to the inlay — `8` is **Gen2** (EPC Class-1 Gen-2, the dominant UHF standard, used by virtually every modern RFID label). Older protocols still selectable: `1` ISO 18000-6B, `4` Gen1, `5` ISO 18000-6A, `6` UCODE EPC 1.19. The remaining parameters tune **encoder retry / void behaviour**: `e` voided-label count limit, `n` numeric retry count for write failures, `a` antenna port (multi-antenna encoders only). Without an `^RS` in the format, the encoder runs on whatever defaults the firmware was configured with — which may not match the inlay protocol, silently fail, and ship blank or mis-encoded labels.
^RTUnsupportedReads bytes from an RFID tag memory bank and **routes the result to one of two destinations**: (1) **into a numbered field on the same label** — the read value is captured into field number `f`, and any later `^FN<f>^FS` placeholder in the format substitutes that read value into a printable field (so the printed label can show what was just read); (2) **back to the host** over the serial / network connection — used by host-driven verification flows that need to log encoded values, build serial→tag mappings, or fail jobs on mismatch. The destination depends on the printer's host-status mode and whether the format contains a matching `^FN<f>` reference. Comparable to `^RFR,…` (the read variant of `^RF`) but `^RT` predates the consolidated `^RF` syntax and remains common in legacy templates.
^RUUnsupportedReads RFID tag data until a specific condition is met or a delimiter is found. Useful for reading variable-length data from user memory.
~RVUnsupportedVerifies that a valid RFID tag is present and functioning. Returns tag type, memory size, and status. A quick health check for the tag.
^RWUnsupportedWrites data to a specific memory bank on the RFID tag. More granular than ^RF — lets you target specific memory banks and addresses.
^RZUnsupportedZeros out (clears) a memory bank on the RFID tag. Writes all zeros to the specified bank. Cannot zero the TID bank (factory-set).
^WTUnsupportedSets the number of write retries for RFID encoding. If a write fails, the printer retries up to this many times before voiding the label.
^WVUnsupportedEnables or disables automatic verification after RFID writes. When enabled, the printer reads back the data after writing to confirm it was encoded correctly.
Print Control
^PQSupportedControls a multi-label print run with **five distinct knobs**. `q` is the **total quantity** of unique labels to print (when paired with `^SN` serialization, this advances the serial). `r` is **replicates per serial** — each unique label is printed `r+1` times before advancing the serial (so `^PQ5,0,2,N,N` with serialisation prints 5 unique serials, each duplicated 3 times = 15 labels total). `p` is the **pause-after-N count** for batch separation: after every `p` labels the printer pauses for the operator (set 0 to disable). `o` Y/N overrides any pause requested by `p` (`Y` = ignore pause). `e` Y/N controls **cut on error** when paired with `^MMC` cutter mode (`Y` = retain partial output to investigate, `N` = continue cutting).
^PRSupportedSets **three independent media-feed speeds** in inches per second (ips): `p` = **print speed** (head heating active, pixels being marked), `s` = **slew speed** (blank media advancing between fields or between labels — head idle), `b` = **backfeed speed** (reverse motion, e.g. tear-off retract or peel-and-present indexing). The valid range is model-dependent — typically 1–14 ips on industrial printers, 2–6 ips on desktop models; values are silently clamped to the printer's supported range. Trailing parameters default to `p` if omitted, so `^PR5` sets all three to 5.
^MDSupportedAdjusts how dark the print is — like the darkness/contrast setting on a printer. Higher values mean more heat, making darker prints but using more ribbon and potentially reducing printhead life.
^MNSupportedTells the printer **how to find the boundary between labels** so the next label starts in the right place on the media. The detection method depends on what the loaded media has: `Y` (Web/gap sensing) — a transmissive sensor sees the gap of light between adjacent die-cut labels; `M` (Mark sensing) — a reflective sensor reads black registration marks printed on the back of the liner at fixed intervals; `N` (Continuous) — no boundary detection at all, the printer indexes by `^LL` label-length value (used for receipt-style roll, fanfold journal stock, or when running die-cut labels with the gap sensor disabled). Some firmware also accepts `W` as an alias for `Y` (web).
^MMSupportedSelects how the printer **handles each label after printing**. The mode letter selects the post-print behaviour: `T` Tear-off (label advances to the tear bar; user tears manually — default for most printers), `P` Peel-off (label is dispensed past the peel bar with backing retracted; printer waits for the operator to remove the label before printing the next), `R` Rewind (entire output is wound onto an internal rewind spindle, no per-label dispense), `C` Cutter (the cutter blade fires after each label), `D` Delayed Cut (cutter fires only when an explicit `^CN` cut-now command is sent — used for batches), `A` Applicator (handshake with an external label-applicator device via the applicator interface).
Storage
^XGUnsupportedRecalls a graphic that was **previously stored** in printer memory and places it at the current `^FO` position. The graphic must exist on one of the printer storage devices first — uploaded via `~DG` (download GRF), `~DY` (download arbitrary file), or transferred from USB. The leading `d:` selects which storage device: `R:` = volatile RAM (lost on power-off, fastest), `E:` = onboard flash (persistent, default if `d:` omitted), `B:` = optional non-volatile memory (when fitted). Like `^IM` but adds optional `mx,my` magnification, so the same stored asset can render at multiple sizes without re-uploading.
^DFSupportedWrites the **current label format** (everything between `^XA` and `^XZ` in the same job) to a named file on a printer storage device. The path takes the standard `d:name.ext` form: `d` is the storage device — `R:` volatile RAM (lost on power-off, fastest), `E:` onboard flash (default if `d:` omitted; **persists across power cycles**), `B:` optional non-volatile memory module if fitted. `^DF` is the **producer side** of the `^DF`/`^XF` template pattern: store once with `^DF`, then recall many times with `^XF` and inject per-print data via `^FN` variable substitution. The job that contains `^DF` does NOT print — it stores the format.
^XFSupportedLoads a label format previously stored with `^DF`, then merges in per-print variable data via `^FN<n>^FD<value>^FS` lines. The stored format contains numbered placeholders (`^FN1`, `^FN2`, …) at field positions; the recall job supplies one `^FN<n>^FD<value>^FS` per placeholder. The path is the same `d:name.ext` form as `^DF`/`^XG`: `R:` volatile RAM, `E:` flash (default if `d:` omitted, persistent), `B:` optional memory module. `^XF` is the **consumer side** of the `^DF`/`^XF`/`^FN` template pattern — meaningless without a corresponding `^DF` having stored the format earlier.
^IDSupported**Permanently removes** a stored file from a printer storage device — formats (`.ZPL`), graphics (`.GRF`/`.PNG`), fonts (`.FNT`), or arbitrary downloaded files (`.DAT`). The path uses the standard `d:name.ext` form: `R:` volatile RAM (deletion is moot — it disappears at power-off anyway), `E:` onboard flash (deletion is **persistent** — file is gone after `^XZ` and survives reboot), `B:` optional memory module. **No undo and no confirmation prompt** — the deletion happens immediately when the format is parsed. Wildcards in either name (`LOGO*.GRF`) or extension (`*.ZPL`) match multiple files; `*.*` deletes everything on the device. Fail-safe: deleting a non-existent file is a no-op (no error, no warning).
^IMSupportedRecalls a previously stored graphic (like a logo) and places it on the label at the current ^FO position. The graphic must have been stored first using ~DG or ^DY.
Download & Font Management
~DGUnsupportedDownloads a graphic image (like a logo) to the printer's memory so it can be recalled later with ^XG or ^IM. The image is sent as ASCII hex data.
~DYUnsupportedA more versatile version of ~DG — downloads fonts, graphics, or other objects in various formats (PNG, TTF, etc.) to the printer's storage.
~DBUnsupportedDownloads a bitmap font to the printer. Bitmap fonts are fixed-size, pixel-perfect fonts — useful when you need exact character shapes at specific sizes.
~DEUnsupportedDownloads a custom character encoding table to the printer, allowing you to remap which characters appear for specific byte values.
~DNUnsupportedCancels a download that is currently in progress. Useful if you started a ~DG or ~DY transfer and need to abort it.
~DSUnsupportedDownloads an Intellifont (scalable outline font) to the printer. Intellifonts can be scaled to any size without losing quality.
~DTUnsupportedDownloads a TrueType font to the printer with bounds checking. The font can then be used with ^A@ for high-quality text rendering at any size.
~DUUnsupportedDownloads a TrueType font without bounds checking — faster than ~DT but skips validation. Used when you trust the font data is valid.
~EGUnsupportedDeletes all graphic images from the printer's RAM. This is a quick way to free up memory, but it removes ALL stored graphics — not selective.
^CMUnsupportedChanges the default memory device letter. Normally R: is RAM and E: is flash — this command lets you reassign those letters.
^COUnsupportedControls the font caching system on the printer. Caching speeds up repeated use of the same font by keeping rendered characters in memory.
^CWUnsupportedAssigns a single-letter alias to a font already stored on the printer so subsequent `^A` commands can select it. The font file must be uploaded **first** (via `~DY`, `~DG`, `~DU`, USB import, or factory pre-load) — `^CW` only maps an existing file to a letter, it does not transfer the font.
^DCUnsupportedDownloads a calendar/date format to the printer's real-time clock. Used to define custom date formats for date-stamped labels.
^DNUnsupportedAborts a download operation that is currently in progress. The caret version of ~DN — they do the same thing.
^EFUnsupportedDeletes all stored label formats from the printer's RAM. Does not affect graphics or fonts — only formats saved with ^DF.
^HFUnsupportedSends a stored label format back to the host computer. Useful for retrieving a template that was previously saved on the printer.
^HGUnsupportedSends a stored graphic image back to the host computer in ASCII hex format. The reverse of ~DG.
^HYUnsupportedUploads a graphic from the printer to the host. Similar to ^HG but uses a different transfer protocol.
^ILUnsupportedLoads a previously-stored image from a printer storage device into the **label background bitmap** at the start of a format. The path takes the standard `d:name.ext` form: `d` is the storage device (`R:` volatile RAM, `E:` onboard flash — default if omitted, `B:` optional memory module), `name.ext` is the filename (commonly `.GRF`, but firmware also accepts `.PCX`/`.PNG`/`.BMP` if those formats are stored). Unlike `^XG` which positions a stored asset at the current `^FO` origin, `^IL` paints the entire image into the label canvas as a backdrop that subsequent fields render on top of.
^ISUnsupportedSaves the current label's bitmap image to the printer's memory. Captures what would be printed as a stored graphic.
^JBUnsupportedErases and reinitialises the printer's flash memory (E: drive). WARNING: This deletes ALL stored fonts, graphics, and formats from flash.
^LFUnsupportedReturns a list of all font identifier assignments (^CW mappings) currently active on the printer.
^MCUnsupportedClears the label's internal bitmap buffer. When set to Y, the bitmap is cleared before each label — this is the normal behaviour. Set to N to overlay multiple formats.
^SEUnsupportedSelects a previously downloaded encoding table as the active character set. Works with custom encodings downloaded via ~DE.
^TOUnsupportedCopies a stored object (font, graphic, or format) from one memory location to another. For example, copy a graphic from RAM to flash for permanent storage.
^WDUnsupported**Diagnostic command — prints a system label, not user content.** `^WD` causes the printer to render and print a label whose body is a printer-formatted **directory listing** of files stored on the named device — fonts (`.FNT`), graphics (`.GRF`/`.PNG`), formats (`.ZPL`), images. The label content is generated by firmware (filename, size, type per Zebra firmware format) and is **not user-styleable** — `^WD` ignores any `^FO`/`^A`/`^FD` you place around it. Each `^WD` invocation consumes one label of media; do NOT issue it inside automated print loops.
Status, Query & Diagnostics
~HSUnsupportedThe most important status command — returns three lines of comma-separated printer status including paper out, head open, pause state, label length, and more. This is what monitoring software polls continuously.
~HIUnsupportedReturns the printer's model name, firmware version, DPI, and memory size. Like asking the printer "who are you?".
~HMUnsupportedReturns how much RAM is available on the printer — total and free. Useful before downloading large graphics or fonts.
~HQUnsupportedA versatile query command that returns different information depending on the sub-command. ~HQES returns error history, ~HQJT returns head test results, etc.
~HBUnsupportedReturns battery charge level and health on mobile/portable Zebra printers. Not applicable to desktop printers.
~HDUnsupportedReturns printhead diagnostic data including element resistance values. Used to detect failing dots on the printhead before they cause print quality issues.
~HUUnsupportedReturns the current alert/notification configuration for ZebraNet-enabled printers. Shows which events trigger alerts and where they're sent.
~JDUnsupportedPuts the printer into diagnostic mode where it prints all incoming data as ASCII hex on labels instead of interpreting it as ZPL. Invaluable for debugging communication issues.
~JEUnsupportedTakes the printer out of diagnostic mode and back to normal ZPL processing. The counterpart to ~JD.
~WCUnsupportedPrints a physical label showing the printer's complete configuration — darkness, speed, label size, IP address, firmware, and more. The "settings page" of a Zebra printer.
~WQUnsupportedPrints a label showing the printer's current RFID configuration and status — antenna power, tag type, encoding position, and error counts.
^HHUnsupportedReturns the printer's configuration data to the host computer (instead of printing it like ~WC). Same information, but sent over the communication channel.
^HVUnsupportedReturns the **runtime value of a numbered field** (`^FN<f>`) back to the host **after the label has been processed** — for read-back-after-write verification. The host receives a single line over the same connection that issued the format: an optional header `h`, the field value (truncated to `n` bytes if specified), and an optional terminator `t`. Crucially, when paired with `^RT` (read RFID tag → into `^FN<f>`), the host receives the **value the RFID encoder actually read off the tag** — making `^HV` the canonical "did my encode succeed?" signal in production RFID flows. For a label without `^RT`, `^HV` simply echoes the input value sent in `^FN<f>^FD…^FS`.
^HWUnsupported**Direction: printer → host**, not host → printer. The printer enumerates files on the chosen storage device and sends a plain-ASCII listing back over the **same connection that issued the command** — TCP socket, USB serial, parallel, etc. Where `^WD` (Print Directory Label) wastes a label on the same data, `^HW` keeps the result programmatic and machine-parseable. Output rows give filename, size, and type per Zebra firmware format. Storage device and filename pattern follow the standard `d:o.x` form: `R:` RAM, `E:` flash (default), `B:` optional memory, `*` aggregates all; `*.GRF` / `*.ZPL` / `*.*` filters by extension.
^HZUnsupportedReturns detailed printer description including model, serial number, firmware version, and installed options. More detailed than ~HI.
^JTUnsupportedSets how often the printer automatically tests its printhead for bad elements. The test runs every n labels. Set to 0 to disable.
^MAUnsupportedConfigures maintenance alerts that trigger when the printhead, cleaning, or other counters reach a threshold. Helps schedule preventive maintenance.
^WRUnsupportedPrints a label showing the printer's network configuration — IP address, subnet mask, gateway, SSID (for wireless), signal strength, and MAC address.
Sensors, Calibration & Mechanics
~JCUnsupportedRuns an automatic media sensor calibration. The printer feeds labels while measuring the gap/mark sensor to learn the label layout. Essential after loading a new roll of labels.
~JGUnsupportedPrints a graph showing sensor readings across several labels — a visual diagnostic that helps you see exactly what the sensor sees. Dark areas are gaps/marks, light areas are label backing.
~JLUnsupportedSets the maximum label length that the printer will accept. If a label format exceeds this, the printer skips it. Acts as a safety limit.
~JNUnsupportedRuns a printhead element test and treats failures as fatal — the printer stops and reports an error if any dots are bad. Stricter than ~JO.
~JOUnsupportedRuns a printhead element test but treats failures as warnings — printing continues even if bad dots are detected. Less strict than ~JN.
~JSUnsupportedControls when and how the printer backs up the media after printing. Options include no backfeed, before printing, or after printing.
~PHUnsupportedFeeds the media forward until the next label gap is at the printhead. Like pressing the "feed" button once — positions the next label for printing.
~PLUnsupportedAdjusts how far the label is presented (extended out) after printing. Useful for peel-off or tear-off applications.
~PPUnsupportedPauses the printer after each label. The operator must press feed (or send ~PS) to continue. Useful for manual inspection of each label.
~PRUnsupportedReprints the last label that was printed. Useful when an applicator misses a label or a label is damaged during application.
~PSUnsupportedResumes printing after a pause (~PP or front panel pause). The "unpause" command.
~ROUnsupportedResets one of the printer's internal counters (odometer, head clean counter, etc.) to zero.
~SDUnsupportedSets the print darkness (heat intensity) from 0 to 30. Higher values make darker prints but wear the printhead faster. The tilde version of ^MD.
~TAUnsupportedFine-tunes where the label stops relative to the tear bar. Positive values feed more, negative values retract. Measured in dots.
^JCUnsupportedThe caret version of ~JC — runs automatic media sensor calibration from within a label format.
^JHUnsupportedConfigures when the printer alerts you about low media or ribbon. Set thresholds so you get warnings before the printer runs out.
^JJUnsupportedConfigures the behaviour of the printer's auxiliary (applicator) port. Controls signals for label-applied, start-print, and error conditions.
^JMUnsupportedTells the printer to interpret coordinates at a different DPI than its physical resolution. Allows ZPL designed for 203dpi to print on a 300dpi printer (or vice versa).
^JNUnsupportedThe caret version of ~JN — enables fatal head testing from within a label format. Printer stops on dot failure.
^JSUnsupportedSelects which sensor to use for detecting labels — transmissive (gap sensing through the media) or reflective (mark sensing on the backing).
^JUUnsupportedSaves or restores the printer's configuration. Save (S) writes current settings to flash so they survive power cycles. Restore (R) reloads saved settings.
^JWUnsupportedAdjusts the tension applied to the thermal transfer ribbon. Higher tension prevents wrinkles but can cause ribbon breaks. Only relevant for thermal transfer (not direct thermal).
^JZUnsupportedControls whether the printer automatically reprints the last label after recovering from an error (head open, paper out, etc.).
^MLUnsupportedSets the maximum label length the printer will accept. If a format exceeds this, the printer rejects it. A safety limit to prevent runaway feeding.
^MTUnsupportedSelects the **physical printing mechanism** the firmware should drive. `^MTT` = **Thermal Transfer** — the print head heats a wax/resin **ribbon** which transfers ink onto plain label stock; the ribbon is consumed. `^MTD` = **Direct Thermal** — the print head heats specially-coated, heat-sensitive label stock directly, blackening the coating where heated; **no ribbon** is used. The setting tells the printer how to drive head energy, ribbon-low sensors, and ribbon take-up motor — not just a print-quality knob.
^MWUnsupportedControls whether the printer warns when the printhead is too cold for quality printing. Some environments (cold warehouses) trigger this frequently.
^SRUnsupportedManually sets the printhead resistance value. Normally auto-detected, but can be overridden if the auto-detection is wrong (rare — usually after a head replacement).
^SSUnsupportedManually sets the sensitivity thresholds for the media and ribbon sensors. Normally auto-calibrated with ~JC, but this allows manual fine-tuning.
Network & Communication
~NCUnsupportedSets the primary network connection type. Tells the printer which network interface to use for communication.
~NRUnsupportedResets all network settings to factory defaults. Clears IP address, subnet, gateway, and all other network configuration.
~NTUnsupportedSets the currently active network type. Switches between wired Ethernet and wireless without changing saved configuration.
^NCUnsupportedThe caret version of ~NC — sets the primary network connection from within a label format.
^NDUnsupportedConfigures the **wired Ethernet** network parameters — static IP, subnet mask, default gateway, optional WINS server (legacy NetBIOS name resolution), and TCP listening port (default 9100 for raw print). **Settings are written to the print server's persistent NVRAM** and survive power cycles. **The new IP does not bind until the print server reboots** — either send `~JR` (Reset Printer) or power-cycle the printer manually after the format containing `^ND` finishes. Until reboot, the existing network configuration remains active and the new values are queued.
^NIUnsupportedSets the printer's **network identifier** — a string (or numeric ID, depending on firmware) used by host-side discovery and management systems to recognise this specific unit on the LAN. Stored in NVRAM. Surface where the ID actually appears varies: SNMP `sysName`, Zebra Setup Utilities discovery, fleet-management APIs, and label-print job routing all read this value. The wire format and persistence are firmware-specific — older Z-series treat it as a numeric station ID (1–999), newer ZebraNet print servers accept arbitrary identifier strings (typically 16-char ASCII).
^NKUnsupportedSets the wired Ethernet IP address. A simpler alternative to ^ND when you only need to change the IP.
^NPUnsupportedSelects **which network interface acts as the primary print server** on a multi-interface Zebra printer. On models with both wired Ethernet and wireless 802.11 (or with optional secondary print servers), `^NP` decides which interface accepts incoming print jobs and is reported as the active network identity. The single-letter selector is **model-dependent** — the universally-supported value is `P` (Primary print server, whichever the firmware considers default); newer ZebraNet print servers also accept `W` (force Wired) and `I` (force Internal/wireless), and historically `E` (External print server) on models with the optional ZebraNet 10/100. **Not a TCP port command** — for the print listening port use `^ND`'s 5th parameter.
^NRUnsupportedThe caret version of ~NR — resets network settings to factory defaults from within a label format.
^NSUnsupportedConfigures miscellaneous network settings like DHCP enable/disable, default protocol, and timeout values.
^NTUnsupportedSets the network type — wired Ethernet or wireless. The caret version of ~NT.
^SCUnsupportedConfigures the printer's **RS-232 serial port** line discipline — baud rate, word length, parity, stop bits, and the two layers of handshake (electrical/software flow control plus the optional Zebra acknowledge protocol). On a serial-attached printer this is the contract every byte from the host must travel under: framing, speed, and back-pressure. The six parameters together fully describe the UART configuration; **the host serial library (Windows COM-port settings, Linux `termios`/`stty`, or your application's serial driver) must be set to the *exact* same six values** or the printer will see corrupt bytes (silent garbage characters in fields, format-prefix `^` not detected, no labels printed) or no traffic at all (one side blocked waiting for a handshake the other never sends). Note: the baud parameter on classic firmware uses an **encoded token** (`1`–`9`,`A`–`E`) rather than the raw baud number — see the parameter list below; modern firmware accepts the raw baud as well, but the encoded form is what most real-world `^SC` examples in Zebra documentation use.
^SLUnsupportedSets the printer's command language mode. Zebra printers can accept ZPL, EPL, CPCL, or line-print mode. This switches between them.
^SOUnsupportedSets a global offset for label length and width. Adjusts the effective print area without changing the label stock dimensions.
^SPUnsupportedStarts printing — the caret version of ~PS. Resumes printing after a pause.
^WFUnsupportedConfigures the printer's wireless settings — SSID, security type, and password. The primary command for connecting a printer to a WiFi network.
^SXUnsupportedToggles the printer's **XML-aware input parser** — when enabled, the printer accepts label data wrapped inside XML elements (rather than as raw ZPL strings) and binds the XML field values into a previously-stored ZPL template (typically loaded with `^DF`/recalled with `^XF`). This is the entry point for **integrations driven by XML label-management systems** that produce one XML document per label (or per batch) and expect the printer to resolve the document against a saved format. While XML mode is on, the printer treats incoming bytes as XML to be parsed (extracting field values into the recalled format's `^FN` placeholders) rather than as a raw ZPL command stream — turning it off restores raw-ZPL parsing. The mode is **sticky** across power cycles when committed via `^JU` and is normally enabled once during printer commissioning, not toggled per label.
Control, Language & ZBI
~CCUnsupportedChanges the caret character (^) to a different character. After this command, the new character is used instead of ^ for all commands. Rarely needed — mainly for environments where ^ conflicts.
~CDUnsupportedChanges the delimiter character (comma by default) to a different character. Affects parameter separation in all subsequent commands.
~CTUnsupportedChanges the tilde character (~) to a different character. After this, the new character is used for all tilde commands.
~JAUnsupportedCancels all label formats currently in the print queue and clears the buffer. The "emergency stop" for printing — stops everything immediately.
~JBUnsupportedResets the optional memory card (if installed). Clears all data from the memory expansion module.
~JFUnsupportedSets the battery condition threshold on mobile printers. Controls when the printer warns about low battery.
~JIUnsupportedStarts the ZBI (Zebra Basic Interpreter) program stored on the printer. ZBI lets you run custom programs directly on the printer for data processing, conditional logic, and more.
~JPUnsupportedPauses the printer and cancels the currently printing format. Different from ~JA — this only cancels the current label, not the entire queue.
~JQUnsupportedStops the running ZBI program. The counterpart to ~JI.
~JRUnsupportedPerforms a software reset of the printer — equivalent to turning it off and on again. All volatile settings are lost, but saved configuration persists.
~JXUnsupportedAn alternative reset for optional memory. Similar to ~JB but may behave differently on certain printer models.
^CCUnsupportedThe caret version of ~CC — changes the caret character from within a label format. The change takes effect immediately.
^CDUnsupportedThe caret version of ~CD — changes the parameter delimiter from within a label format.
^CTUnsupportedThe caret version of ~CT — changes the tilde character from within a label format.
^KDUnsupportedSets the format for date and time fields when using the printer's real-time clock (RTC). Controls how dates appear on labels.
^KLUnsupportedSets the language for the printer's display panel and configuration labels. Doesn't affect ZPL commands — only the printer's UI.
^KNUnsupportedSets a human-readable name for the printer. This name appears in ~HI responses and on the printer's display. Useful for identifying printers in a fleet.
^KPUnsupportedSets or changes the printer's configuration password. When a password is set, configuration commands require the password to execute.
^MPUnsupportedLocks or unlocks certain printer settings to prevent changes. A more granular approach than passwords — protect specific settings while leaving others open.
^PAUnsupportedSets advanced text rendering properties including character spacing, line spacing, and justification defaults.
^PEUnsupportedSets the printer's primary command language. Similar to ^SL but specifically targets the print engine. Switches between ZPL, EPL, CPCL.
^PMUnsupportedMirrors the entire label horizontally — everything prints as a mirror image. Useful for printing on transparent media that will be viewed from the other side.
^PPUnsupportedThe caret version of ~PP — enables pause-after-each-label from within a label format.
^SQUnsupportedHalts (pauses) the running ZBI program without terminating it. The program can be resumed later. Different from ~JQ which fully terminates.
^STUnsupportedSets the printer's real-time clock (RTC). Required for date/time stamping on labels. Only works on printers with an RTC module installed.
^SZUnsupportedSelects the ZPL language dialect the printer uses to parse the rest of the format: **`B` = ZPL II (modern, default)**, **`A` = ZPL (legacy / ZPL I)**. ZPL II is the superset Zebra has shipped since the mid-1990s — it added advanced barcodes (PDF417, Data Matrix, QR, MaxiCode, Aztec, GS1 Composite), scalable/extended fonts (`^A0` family, `^CW`/`^CI` variants), graphic boxes/lines (`^GB`), bitmap import (`~DG`/`^XG`), download/format storage (`^DF`/`^XF`), and the modern label-format command set as a whole. ZPL (legacy) is the original 1980s pre-ZPL-II language and silently rejects or mis-renders any of those modern constructs. The mode is **sticky** — once set, it persists until changed by another `^SZ`, a configuration reset (`^JU`), or a power cycle that loads a different default from saved configuration. **In legacy ZPL I mode, `^SZB` is itself the only escape route back to ZPL II** — most other ZPL II commands will be rejected. Almost all real-world labels use ZPL II; legacy mode exists only for backward compatibility with very old host software that still emits pre-ZPL-II command streams.
^ZZUnsupportedPuts the printer into a **low-power sleep state** to save energy (and, on battery-powered models like the QLn / ZQ-series, extend battery life). While asleep, the printer's **CPU, display, and most I/O subsystems are powered down** — incoming bytes on the serial/USB/network ports may be **buffered, deferred, or dropped entirely** depending on the model and the channel; the printer will not respond to status queries (`^HH`, `~HS`, `~HI`) and will not start a print job until it wakes. The wake condition depends on **how `^ZZ` was issued**: with a timeout argument `t`, the printer auto-wakes after `t` seconds; without `t` (or with `t=0`), the printer sleeps **until an external wake signal arrives** — a button press on the front panel, a host-side wake command (`~WC` on supporting firmware, or a low-level USB/serial wake-up byte sequence), or on networked models a `WoL` magic packet to the printer's MAC. Optional second parameter `b` controls whether to **beep on wake** (audible confirmation that the printer is again ready). Sleep state is **not persistent across power cycles** — a power-on always resets to fully-awake.
Try these commands live
The ZPL Playground lets you write ZPL and see labels render in real time — with syntax highlighting, autocomplete, and the full command reference built in.