.wmf

What is a .wmf file?

Windows Metafile · Image · Microsoft · 1990

WMF is an old Windows vector image format that stores a list of drawing commands rather than pixels. It was widely used for clip art in Microsoft Office and can hold both vector shapes and bitmaps.

Category
Image
Type
Binary
Is a .wmf file safe to open? Usually safe, but metafiles can contain drawing records that have been abused in the past. Open WMF files from unknown sources cautiously, in a viewer rather than an editor.

What is a .wmf file used for?

A Windows Metafile replays a sequence of GDI drawing calls, so it scales like a vector image. A placeable WMF adds a header (starting D7 CD C6 9A) that records the intended size. Its successor is the Enhanced Metafile, EMF.

WMF is mostly seen in legacy Office documents and clip-art sets. Note that WMF and EMF can carry executable drawing records, so treat files from untrusted sources with care.

What opens a .wmf file?

The .wmf format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.

Windows

  • Microsoft Office
  • LibreOffice
  • IrfanView
  • Inkscape

macOS

  • LibreOffice
  • Inkscape

Linux

  • LibreOffice
  • Inkscape
  • ImageMagick

Open a .wmf file step by step

  1. Confirm the file really is a .wmf. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
  2. On Windows, open it with Microsoft Office or LibreOffice.
  3. On Mac, use LibreOffice or Inkscape.
  4. On Linux, try LibreOffice or Inkscape.
  5. Still stuck? Convert the .wmf to svg, which opens more widely.

Why can't I open my .wmf file?

Almost always because no installed app understands WMF. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.

The other possibility is that the file is not really a .wmf at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.

How to convert a .wmf file

You can convert a .wmf file to svg, png, emf using a conversion tool or the export menu of an app that opens it.

What is the .wmf file signature (magic bytes)?

A .wmf file starts with the hex bytes D7 CD C6 9A. Programs identify WMF by those bytes, not by the filename, so a renamed file still gives itself away.

These are the documented signatures for WMF. For a full breakdown, see the Windows Metafile file signature page.

Documented magic-byte signatures for the .wmf format
Hex signatureOffsetASCIINote
D7 CD C6 9A0-placeable WMF
01 00 09 000-standard WMF

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .wmf file?

WMF is an old Windows vector image format that stores a list of drawing commands rather than pixels. It was widely used for clip art in Microsoft Office and can hold both vector shapes and bitmaps.

How do I open a WMF file?

Microsoft Office and LibreOffice open WMF, as do Inkscape and IrfanView. Inkscape can convert it to SVG.

What is the difference between WMF and EMF?

EMF (Enhanced Metafile) is the newer 32-bit successor to WMF, with more drawing commands and better fidelity. Both are Windows vector formats.

How do I convert WMF to SVG?

Open the WMF in Inkscape and save as SVG, or use LibreOffice Draw to import and export it.

Related formats

Sources

Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.