SWM File Documentation


Summary

A SWM (Split Windows Imaging Format) file is one piece of a Windows install image that was too large to fit on its target media. A big install.wim is split into install.swm, install2.swm, install3.swm and so on, mainly so it fits on a FAT32 USB drive, which cannot hold a single file over 4 GB. It is deployment data, not a document, and you need all the parts together. Its MIME type is application/octet-stream.

Technical details

FeatureValue
Full nameSplit Windows Imaging Format (Split WIM)
File extension.swm
MIME typeapplication/octet-stream
Format typeOne part of a WIM disk image split into pieces (binary)
DeveloperMicrosoft
Base formatWIM (Windows Imaging Format), file-based image
IntroducedWIM since Windows Vista (2006); split via ImageX, now DISM
Open standardNo (documented by Microsoft)
Byte orderLittle-endian
Magic number4D 53 57 49 4D 00 00 00 (“MSWIM\0\0\0”)
Header locationOnly the first part (install.swm) carries a usable WIM header
CompressionXPRESS or LZX (per-resource, inside the WIM)
Split reasonFAT32 4 GB per-file limit; spanning DVDs
Split toolDism /Split-Image (also Rufus, wimlib)
Merge toolDism /Export-Image /SWMFile:install*.swm
Parts neededAll of them — a single continuation part is unusable alone
Related extensions.wim, .esd, .iso, .ppkg
Specificationlearn.microsoft.com (Split a Windows image)
File signature (magic bytes)
4D 53 57 49 4D 00 00 00

Offset 0, 8 bytes. In ASCII this reads M S W I M \0 \0 \0, the standard WIM/SWM header tag. Only the first split part (install.swm) begins with this signature and the full WIM header that follows it (header size, version, flags, part number, total parts, and the offsets of the metadata and lookup tables). The continuation parts (install2.swm, install3.swm, ...) hold raw resource data carved from the same image and are not independently openable. The whole set must be kept together to reconstruct the original .wim.

What is a SWM file?

SWM is short for Split Windows Imaging Format, usually just called a Split WIM. To understand it you first need WIM, Microsoft’s Windows Imaging Format, a file-based disk image introduced with Windows Vista in 2006 and used to deploy the operating system. The install.wim inside a Windows ISO is a WIM: it holds the entire Windows image as a set of files rather than a sector-by-sector clone. A WIM can be large, often well over 4 GB, and that size becomes a problem when the image has to sit on a FAT32-formatted USB stick (required for UEFI booting on many PCs) or span several DVDs, because FAT32 cannot store any single file larger than 4 GB.

The fix is to split the WIM into several smaller files, each with the .swm extension: install.swm, install2.swm, install3.swm, and so on. Together the parts contain exactly the same data as the original install.wim. A SWM file is therefore not a document you open; it is one slice of a Windows deployment image, and the slices only mean something as a complete set.

The WIM container the split comes from

Because a SWM is a split WIM, its structure is the WIM structure. A WIM begins with a fixed header, tagged with the 8-byte signature MSWIM\0\0\0, that records the format version, a set of flags, the compression method, and the file offsets of the two tables a reader needs. The first is the lookup table (Microsoft calls it the offset table), which lists every unique file resource in the image, its compressed and uncompressed size, its position, and a SHA-1 hash. The second is the XML data, a block of metadata describing the image or images the WIM contains: the Windows editions, their names, sizes and indexes.

WIM header (first part only)
  ImageTag       "MSWIM\0\0\0"   8 bytes at offset 0
  cbSize         header length
  dwVersion      WIM format version
  dwFlags        e.g. compression type (XPRESS / LZX), spanned set
  PartNumber     which .swm this is (1, 2, 3 ...)
  TotalParts     how many .swm parts make the set
  ImageCount     number of images inside
  rhOffsetTable  -> lookup / offset table
  rhXmlData      -> XML metadata (editions, sizes)
  ...
File resources  (compressed file data, divided across the parts)

Two header fields are what make a WIM a split WIM: PartNumber and TotalParts. The first part is part 1 of N and carries the header, the lookup table and the XML; it is the map of the whole set. The later parts are continuations that hold only resource data, so their content is meaningless without the first part’s tables telling a reader which bytes belong to which file. This is why install2.swm cannot be opened on its own and why a missing part makes the entire image unusable.

How the split is created and how a file is found

Splitting is a byte-budget operation, not a re-compression. The tool walks the WIM’s resources and packs them into parts up to a target size (for FAT32 the practical target is just under 4000 MB), writing the header and tables into part 1 and streaming the resource data across the remaining parts. Modern Windows does this with DISM: Dism /Split-Image /ImageFile:install.wim /SWMFile:install.swm /FileSize:4000 produces install.swm, install2.swm and however many more are needed. The older Windows AIK tool ImageX did the same job before DISM replaced it in Windows 8, and Rufus performs the split automatically when it writes a large image to a FAT32 USB.

To read a file out of a split set, a reader consults the lookup table in part 1, which gives each resource’s offset. Because the resources are spread across parts, the offset is interpreted against the concatenation of all parts in order, so the reader treats the set as one logical stream. That is exactly why every part has to be present and correctly named: the offsets assume the full sequence.

Applying and merging split images with DISM

There are two things you normally do with a .swm set. The first is to reassemble it into a single WIM. DISM does this with an export that reads all parts and writes one file: Dism /Export-Image /SourceImageFile:install.swm /SWMFile:install*.swm /SourceIndex:1 /DestinationImageFile:install.wim, with every part in the same folder so the install*.swm wildcard matches them all. On Linux or macOS the cross-platform wimlib library does the same through its wimexport command.

The second is to deploy Windows straight from the split set without merging first. DISM can apply a split image directly: Dism /Apply-Image /ImageFile:install.swm /SWMFile:install*.swm /Index:1 /ApplyDir:W:\ expands the selected edition onto a target volume. Windows Setup itself understands a split install.swm on USB media, which is why a Rufus-made FAT32 installer boots and installs normally even though the image is in pieces. For browsing rather than deploying, 7-Zip can open the first part and list or extract individual files, because it understands the WIM container.

Relationship to WIM, ESD and ISO

SWM, WIM and ESD are the same family at different compression and packaging levels. WIM is the base image. ESD is a more heavily compressed variant (using the LZMS “recovery” compression) that the Media Creation Tool and Windows Update deliver, produced from a WIM with Dism /Export-Image ... /Compress:recovery. SWM is simply a WIM cut into size-limited parts. Getting from a .swm set back to a bootable .iso is a workflow, not a single conversion: you merge the parts into install.wim, place that back into a Windows source folder, and build the ISO with a tool such as oscdimg from the Windows ADK. The .swm only ever replaces the WIM that lives inside the ISO.

Frequently asked questions

Do I need all the .swm files?

Yes. Only the first part holds the WIM header and the lookup table; the rest are continuation parts holding resource data. The lookup table’s offsets assume the full sequence of parts, so if any part is missing the image is incomplete and cannot be applied or merged. Keep install.swm, install2.swm and every later part in the same folder.

Why can’t I open install2.swm on its own?

Because it has no WIM header. Only install.swm begins with the MSWIM\0\0\0 signature and the tables that describe the image; a continuation part is raw resource data with no map, so a tool opening it in isolation finds nothing it can interpret. Open the first part instead, or point DISM at the whole set with the install*.swm wildcard.

Why was my install.wim split into .swm files?

Because it was larger than 4 GB and the target media is FAT32, which is required for UEFI USB booting on many PCs and cannot store a single file over 4 GB. Tools like Rufus and DISM split the WIM into size-limited .swm parts so it fits, then Windows Setup reassembles it during installation.

References