DST File Documentation


Summary

A Tajima DST (Data Stitch Tajima) file holds a machine-embroidery design: a 512-byte ASCII header plus a run of 3-byte records that tell an embroidery machine exactly where to move the needle and when to jump, change colour, or stop. It is stitch instructions, not a picture, and its MIME type is application/octet-stream. A plain .dst stores stitch coordinates but no thread colours, which is why designs open with placeholder colours you reassign yourself.

Technical details

FeatureValue
Full nameTajima Embroidery Stitch File (Data Stitch Tajima)
File extension.dst
MIME typeapplication/octet-stream (also seen: application/x-dst)
Format typeBinary machine-embroidery stitch file (coordinates + machine commands)
DeveloperTajima (Tokai Industrial Sewing Machine Co., Ltd.)
Introduced1980s; the de facto universal embroidery interchange format
Open standardPartial — widely reverse-engineered, no published vendor spec
Byte orderBig-endian for the 3-byte stitch records
HeaderFixed 512 bytes, ASCII, label fields terminated by 0x0D
Header fieldsLA: label, ST: stitch count, CO: colour changes, +X/-X/+Y/-Y extents, AX/AY offsets
Stitch record3 bytes per stitch: signed X/Y deltas plus control flags
Coordinate weightsTernary sums of ±1, ±3, ±9, ±27, ±81 units (0.1 mm each)
Max move per record121 units (12.1 mm) on either axis
Control codesJump 0x83, colour-change/stop 0xC3, end 0xF3
CompressionNone
Colour dataNot stored — only colour-change points, not thread colours
Magic numberASCII LA: (hex 4C 41 3A) at offset 0
Related extensions.pes, .jef, .exp, .hus, .vp3, .pec, .xxx, .u01
Machine supportRead by nearly every industrial and home embroidery machine
File signature (magic bytes)
4C 41 3A

Offset 0, 3 bytes. In ASCII this reads L A : — the LA: label field that opens the 512-byte Tajima header, followed by the design name. There is no formal binary signature; the LA: prefix (with ST: and CO: fields close behind) is how software recognises an embroidery DST rather than an unrelated file that happens to use the .dst extension. The header is padded with spaces (0x20) to exactly 512 bytes, after which the 3-byte stitch records begin.

What is a DST file?

DST stands for Data Stitch Tajima, the machine-embroidery format created by Tajima (Tokai Industrial Sewing Machine Co., Ltd.) in the 1980s. A .dst file is a stitch file: rather than an image, it stores the exact path a needle follows as a long list of relative movements plus machine commands such as jump, colour-change (stop) and trim. An embroidery machine reads these records and physically sews the design. Because almost every machine and digitising program can import it, DST became the closest thing the industry has to a universal interchange format, which is why people convert other formats (PES, JEF, HUS, EXP) to DST for portability.

The format has no published vendor specification. What is known about its internals comes from decades of reverse engineering by open-source projects such as libembroidery and Ink/Stitch, and the details below reflect that community documentation. Two facts shape everything else: the file is split into a fixed 512-byte text header followed by binary stitch data, and a plain DST records where to change colour but never to what colour.

The 512-byte header: LA, ST, CO and the extents

Every embroidery DST opens with a fixed 512-byte header written in printable ASCII. It is a set of two-letter labelled fields, each of the form XX:value terminated by a carriage return (0x0D), with the whole block padded out to 512 bytes using spaces (0x20). Only about 125 bytes carry data; the rest is padding. The first field, LA:, is the design label and is the reason a DST is recognised by the bytes 4C 41 3A at offset 0.

offset 0    LA:design name        label, 8 chars max, space-padded
            ST:0012345            total stitch count, 7 digits
            CO:012                number of colour changes, 3 digits
            +X:00456              positive X extent (0.1 mm units)
            -X:00123              negative X extent
            +Y:00789              positive Y extent
            -Y:00234              negative Y extent
            AX:+00012 AY:-00034   absolute offsets of last point
            MX:...    MY:...      multi-design coordinates
            PD:******             previous-design marker
            (0x20 padding to byte 511)
byte 512    first 3-byte stitch record begins here

ST: is the total stitch count as seven digits with leading zeros, and it counts everything, including jumps and colour changes, not just sewn stitches. CO: gives the number of colour changes as three digits. The four extent fields (+X, -X, +Y, -Y) record the design's bounding box measured from the origin, so a viewer can report the finished size before a single stitch is read. Most of the header is advisory: because the true stitch count and extents can be recomputed by walking the records, importers routinely ignore or rebuild these fields, trusting only LA: for information that exists nowhere else in the file.

The 3-byte stitch record: ternary coordinate encoding

After the header, the body is a continuous sequence of 3-byte records, one per stitch or command, read big-endian. Each record packs a signed X displacement, a signed Y displacement and a set of control flags into 24 bits. The clever part is how the coordinates are stored: not as a plain two's-complement number, but as a sum of signed powers of three. Each axis has ten bits, one for each of the magnitudes ±1, ±3, ±9, ±27 and ±81, in units of 0.1 mm. To encode a move, the digitiser sets whichever bits add up to the desired delta. That is why the largest single move is 121 units (12.1 mm): 1+3+9+27+81 = 121. Anything longer is split across several records, which is exactly what a jump stitch does when crossing a gap.

Bit layout of one 3-byte record (bit 7 = MSB of each byte):

           bit7  bit6  bit5  bit4  bit3  bit2  bit1  bit0
 byte 1    y+1   y-1   y+9   y-9   x+9   x-9   x+1   x-1
 byte 2    y+3   y-3   y+27  y-27  x+27  x-27  x+3   x-3
 byte 3    jump  c/stop y+81 y-81  x+81  x-81   1     1

 X delta = sum of set x* weights   (0.1 mm units)
 Y delta = sum of set y* weights

The two low bits of byte 3 are always set to 1 in a normal record, which is how 0x03 appears at the end of an ordinary stitch. To read a design, a parser starts a running pen position at the header's origin, then for each record adds the decoded X and Y deltas to the current point and emits a stitch there. The absolute position of any stitch is therefore the accumulated sum of every delta before it; a corrupted record shifts everything that follows, which is one reason manual byte editing is discouraged.

Byte 3 valueMeaning
0x03Normal stitch (needle penetrates fabric)
0x83Jump stitch: move without sewing (bit 7 set)
0xC3Colour change / stop: pause for a thread change (bits 7 and 6 set)
0xF3End of file: the last record of the design

Jumps, stops and the end marker

The control flags in byte 3 turn a bare coordinate move into a machine instruction. A jump (byte 3 = 0x83) moves the frame without lowering the needle, used to travel between two separate parts of a design without leaving a thread trail; several jumps in a row cover distances beyond the 12.1 mm per-record limit. A colour change / stop (0xC3) halts the machine so the operator can rethread with the next colour. In DST these are the same command: the file marks the point at which to stop, and the operator or the software supplies the actual colour. The design ends with an end record (0xF3), and many files also append a Wilcom terminator byte (0x1A) after it. The current article's simplified ST/JUMP/C mnemonics are just human-readable stand-ins for these binary flags.

Why colours are missing: the absent thread table

The single most common surprise with DST is that opening one shows the wrong colours, or a sequence of arbitrary ones. That is by design. A plain Tajima DST stores only the colour-change points (the 0xC3 records), never a palette. There is no block anywhere in the file that says "thread 1 is red, thread 2 is navy". When software loads a DST it assigns default or placeholder colours in change order, and you re-pick the real thread palette yourself. This is the practical difference from formats that do embed colours: PES (Brother/Babylock) and VP3 (Husqvarna/Pfaff) carry a thread list, so a design opens looking correct. Converting DST to PES is therefore partly a colour-assignment step, not just a re-encode.

Editing and scaling a stitch file

Because a DST is a flat list of pre-computed stitch positions, it carries no shapes, no fills and no vector outlines: the "how" of the design has already been resolved into individual needle penetrations. This has a direct consequence for resizing. Scaling a stitch file up or down does not add or remove stitches, so enlarging a design spreads the existing stitches apart and thins the coverage, while shrinking it crowds them and can jam the needle. Meaningful resizing requires re-digitising, where software recalculates stitch density for the new dimensions. Editing should be done in an embroidery suite (Wilcom, Embird, Hatch, or the free Ink/Stitch extension for Inkscape) that understands the record format, rather than by hand, since every delta is relative to the one before it.

Turning artwork into a DST: digitising, not converting

Producing a DST from an ordinary image (JPG, PNG or SVG) is not a file conversion. It is digitising: a person or program decides stitch types, directions, densities and sequencing, then generates the coordinate records. Automatic image-to-DST converters exist but give poor stitch quality, because a raster image contains no information about how thread should lie. The reverse export (DST to SVG) traces the stitch paths back into vector outlines for inspection, but the result is line art, not a machine-ready design. Getting a design onto a machine is a separate step: copy the .dst to a USB stick or use the machine's transfer software, confirm the machine accepts Tajima DST, and load it from the machine's menu.

Frequently asked questions

Why does my DST file show the wrong colours?

Because a standard Tajima DST stores only colour-change points, not the actual thread colours. The file has no palette block, so software fills in placeholder colours in change order and you reassign the real threads yourself. Formats like PES and VP3 embed a colour list, which is why they open looking correct.

What is the longest stitch a single DST record can encode?

121 units, or 12.1 mm, on each axis. Each axis is a sum of the signed weights 1, 3, 9, 27 and 81 (in 0.1 mm units), and 1+3+9+27+81 = 121. Longer travel is split across multiple records, typically as a run of jump stitches.

References