This page describes Spine's binary export format for skeleton and animation data. Runtimes load this data to display animations. Also, Spine can import data in this format, allowing interoperability with other tools.

The Spine Runtimes handle loading binary and JSON data. You do not need to write your own loading code unless you are writing your own runtime from scratch (which is an enormous amount of work).

The binary format has a very small file size and loads very quickly at runtime. The downside is that any changes in the runtime that affect data loading will require the binary data to be re-exported from the Spine project. Also the binary format is not human readable, so the JSON format may be a better choice for inspecting the data.

Data marked "nonessential" is only output when the Nonessential data export setting is checked. This data is not required for rendering but may be useful for tools or when importing the data back into Spine.

The binary format is the serialized version of a "skeleton data" instance, which has a list of bones, slots, skins, and animations. This is stateless data that is not tied to a particular on-screen skeleton instance.

A varint is an int but it is stored as 1 to 5 bytes, depending on the value. There are two kinds of varints, varint+ is optimized to take up less space for small positive values and varint- for small negative (and positive) values.

For each byte in the varint, the MSB is set if there are additional bytes. If the result is optimized for small negative values, it is shifted.

A string is a varint+ length followed by zero or more UTF-8 characters. If the length is 0, the string is null (which can be considered the same as empty for most purposes). If the length is 1, the string is empty. Otherwise, the length is followed by length - 1 bytes. A UTF-8 character may be more than one byte, so there may be more bytes than UTF-8 characters.

stringhash: A hash of all the skeleton data. This can be used by tools to detect if the data has changed since the last time it was loaded.

stringversion: The version of Spine that exported the data. This can be used by tools to enforce a particular Spine version to be used.

floatwidth: The AABB width for the skeleton's attachments as it was in the setup pose in Spine. This can be used as a general size of the skeleton, though the skeleton's AABB depends on how it is posed.

floatheight: The AABB height for the skeleton's attachments as it was in the setup pose in Spine.

booleannonessential: If false, data marked as nonessential will be omitted.

floatfps: The dopesheet framerate in frames per second, as it was in Spine. Nonessential.

stringimages: The images path, as it was in Spine. Nonessential.

varint+bone count: The number of bones that follow.

For each bone:

stringname: The bone name. This is unique for the skeleton.

varint+parent index: The index plus one of the parent bone. This value is omitted for the root bone.

floatrotation: The rotation in degrees of the bone relative to the parent for the setup pose.

floatx: The X position of the bone relative to the parent for the setup pose.

floaty: The Y position of the bone relative to the parent for the setup pose.

floatscaleX: The X scale of the bone for the setup pose.

floatscaleY: The Y scale of the bone for the setup pose.

floatshearX: The X shear of the bone for the setup pose.

floatshearY: The Y shear of the bone for the setup pose.

floatlength: The length of the bone. The bone length is not used much at runtime except for 2 bone IK and to draw debug lines for the bones.

varint+bone index: The index of the bone that this slot is attached to.

colorcolor: The color of the slot for the setup pose. This is an 8 character string containing 4 two digit hex numbers in RGBA order.

stringattachment: The name of the slot's attachment for the setup pose. If null, there is no attachment for the setup pose.

BLEND_MODE_*blend: The type of blending to use when drawing the slot's visible attachment.

varint+ik constraint count: The number of constraints that follow.

For each constraint:

stringname: The constraint name. This is unique for the skeleton.

varint+order index: The ordinal for the order constraints are applied.

varint+bone count: The number of bones that follow (1 or 2).

For each bone:

varint+bone index: The index of the bone whose rotation will be controlled by the constraint.

varint+target index: The index of the target bone.

floatmix: A value from 0 to 1 indicating the influence the constraint has on the bones, where 0 means only FK, 1 means only IK, and between is a mix of FK and IK.

booleanbendPositive: If true, the bones will bend in the positive rotation direction.

varint+transform constraint count: The number of constraints that follow.

For each constraint:

stringname: The constraint name. This is unique for the skeleton.

varint+order index: The ordinal for the order constraints are applied.

varint+bone index: The index of the bone whose transform will be controlled by the constraint.

varint+target index: The index of the target bone.

booleanlocal: True if the target's local transform is affected, else the world transform is affected.

booleanrelative: True if the target's transform is adjusted relatively, else the transform is set absolutely.

floatoffset rotation: The rotation to offset from the target bone.

floatoffset x: The X distance to offset from the target bone.

floatoffset y: The Y distance to offset from the target bone.

floatoffset scale x: The X scale to offset from the target bone.

floatoffset scale y: The Y scale to offset from the target bone.

floatoffset shear y: The Y shear to offset from the target bone.

floatrotate mix: A value from 0 to 1 indicating the influence the constraint has on the bones, where 0 means no affect, 1 means only the constraint, and between is a mix of the normal pose and the constraint.

floattranslate mix: See rotate mix.

floatscale mix: See rotate mix.

floatshear mix: See rotate mix.

varint+path constraint count: The number of constraints that follow.

For each constraint:

stringname: The constraint name. This is unique for the skeleton.

varint+order index: The ordinal for the order constraints are applied.

varint+bone count: The number of bones that follow.

For each bone:

varint+bone index: The index of the bone whose rotation and/or translation will be controlled by the constraint.

varint+target index: The index of the target slot.

PATH_POSITION_*position mode: Determines how the path position is calculated.

PATH_SPACING_*spacing mode: Determines how the spacing between bones is calculated.

PATH_ROTATE_*rotate mode: Determines how the bone rotation is calculated.

floatoffset rotation: The rotation to offset from the path rotation.

floatposition: The path position.

floatspacing: The spacing between bones.

floatrotate mix: A value from 0 to 1 indicating the influence the constraint has on the bones, where 0 means no affect, 1 means only the constraint, and between is a mix of the normal pose and the constraint.

floattranslate mix: See rotate mix.

Skindefault skin: The default skin data, which holds attachments not assigned a skin in Spine.

varint+slot index: The index of the slot the following attachments belong to for this skin.

varint+attachment count: The number of attachments for the slot.

For each attachment:

stringplaceholder name: The name in the skin under which the attachment will be stored.

stringname: The attachment name. If null, use the placeholder name. This is unique for the skeleton. For image attachments this is a key used to look up the texture region, for example on disk or in a texture atlas.

ATTACHMENT_*attachment type: The type of attachment.

For ATTACHMENT_REGION:

stringpath: If not null, this value is used instead of the attachment name to look up the texture region.

floatrotation: The rotation in degrees of the image relative to the slot's bone.

A curve defines the interpolation to use between a keyframe and the next keyframe: linear, stepped, or a Bézier curve.

The Bézier curve has 4 values which define the control points: cx1, cy1, cx2, cy2. The X axis is from 0 to 1 and represents the percent of time between the two keyframes. The Y axis is from 0 to 1 and represents the percent of the difference between the keyframe's values.

floatbone index: The index of the bone that influences the vertex. floatbind position X: The vertex X position relative to the bone. floatbind position Y: The vertex Y position relative to the bone. floatweight: The weight for the bone.