Skip to content
pdfconversionapi

MSG to TIFF API

POST an Outlook .msg file to /v2/convert/msg/to/tiff and receive the laid-out message as TIFF. The two-page site report, sent with ImageResolution=120, came back as one file of 308,642 bytes holding two 992 × 1403 LZW frames tagged 120 dpi.

Endpoint
POST /v2/convert/msg/to/tiff
Accepts
msg
Sample timing
0.102 s median of 5 runsHow we measure
Request size
Up to 10 MB on the Free plan or 100 MB on paid plans, all files together

Request and response

Every sample below ran against the API before this page was published. Set PDFCONVERSIONAPI_KEY to your key and run it as is.

curl -sS -X POST \
  https://api.pdfconversionapi.com/v2/convert/msg/to/tiff \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@site-report-week-9.msg \
  --form-string ImageResolution=120 \
  -o response.json

# FileData is base64. Save the first file in converted/,
# or print the JSON error.
if jq -e '.Files' response.json > /dev/null; then
  mkdir -p converted
  name=$(jq -r '.Files[0].FileName' response.json)
  jq -r '.Files[0].FileData' response.json \
    | base64 --decode > "converted/$name"
else
  cat response.json
fi
200 OK0.102 s median1 file, 301 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.102,
  "Files": [
    {
      "FileName": "site-report-week-9.tiff",
      "FileExt": "tiff",
      "FileSize": 308642,
      "FileData": "SUkqAIGbAwB4AAAAAQAAAHgA…"
    }
  ]
}

Response from our test run on 2026-11-03. ConversionTime shows the median of 5 runs. FileData is shortened here; the real response carries the whole file as base64.

The sample, converted

The same file the code sends. Download the input and the output and compare them yourself.

First page of site-report-week-9.tiff, rendered by the API
Input
site-report-week-9.msg (48 KB)
Output
site-report-week-9.tiff (301 KB)
Source
A fictional Outlook message with a weekly building site report, an inline chart and two attachments, written by us and saved to the Outlook file layout by our own script. (CC0-1.0). How it was made
Made by
2026-11-04, API build 9eeeb0640aba

Parameters

Send these as form fields next to the file. Names are case-insensitive. If you set one of the documented options below that we don't support yet, the request fails with a 400 that names it instead of returning a file made without it.

ParameterWhat it does
ImageResolutioninteger, default 150Scan-like resolution of the frames, stored in the TIFF when you send it. 120 gives the sample's 992 × 1403 frames; with no value the frames are 1240 × 1753 and the file is 415,682 bytes, its resolution tags set to 1 × 1 with no unit.Values: 36–600
MultiPageboolean, default trueKeeps a message of two or more pages in one TIFF called site-report-week-9.tiff. false returns a separate, uncompressed TIFF for each page.
PageRangestringFrames to include. Picking one page returns a single-page TIFF, which is stored uncompressed.Values: 1, 2, 1-2, 2-
ImageWidthintegerFrame width in pixels, overriding the resolution's pixel count.Values: 1–20,000
ImageHeightintegerFrame height in pixels.Values: 1–20,000
ColorSpaceenum, default defaultGrayscale or black-and-white pixels, written as one 8-bit channel in the combined file as well: gray with the sample at 120 dpi came to 193,626 bytes against 308,642 in color, and monochrome to 39,942.Values: default, rgb, gray, monochrome
ConvertHeaderboolean, default truePrint the subject and the sender, To, Cc and Date rows at the top of frame 1.
PageSizeenum, default a4Paper for the layout; letter makes frames 8.5 × 11 inches.Values: a0–a9, b0–b5, letter, legal, ledger
PageOrientationenum, default portraitLandscape frames for wide messages.Values: portrait, landscape
PageWidthintegerFrame paper width in millimeters.Values: 10–30,000 (mm)
PageHeightintegerFrame paper height in millimeters.Values: 10–30,000 (mm)
MarginTopinteger, default 5Top margin of every frame.Values: 0–500 (mm)
MarginRightinteger, default 5Right margin of every frame.Values: 0–500 (mm)
MarginBottominteger, default 5Bottom margin of every frame.Values: 0–500 (mm)
MarginLeftinteger, default 5Left margin of every frame.Values: 0–500 (mm)
BackgroundColorstring, default whiteColor under the page content.Values: Color names, #RRGGBB or R,G,B
TransparentColorstringColor turned fully transparent; the frames then carry an alpha channel instead of being plain RGB.Values: Color names, #RRGGBB or R,G,B
IgnoreAttachmentErrorsboolean, default falseIgnored after reading; no attachment is converted.
Mergeboolean, default trueIgnored after reading; MultiPage controls combining.
FileNamestringOutput name without .tiff.
StoreFileboolean, default falseHand back a URL valid for 3 hours instead of the TIFF bytes.

Not supported yet

Setting one of these to anything but its default returns 400.

OptionWhat to do instead
TemplateFileNot accepted with any value.
DateTimeFormatNot accepted with any value; the Date row is the saved header text.
ConvertAttachmentsNot accepted as true; use /v2/convert/email/to/extract for the files.

What carries over, and what doesn't

Kept

  • Both pages of the sample in one file, as frames 1 and 2, at 120 dpi
  • The Outlook HTML body with its blue table headings, colored status words and cost table
  • The progress chart carried as an attachment with a content ID, drawn inside the body
  • The header rows from the message's properties and saved internet headers, including the Date as written: Mon, 26 Oct 2026 08:30:00 -0700
  • Every pixel exactly: the combined TIFF is LZW-compressed and lossless
  • The two ordinary attachments, named with their sizes at the end of frame 2

Lost or not yet supported

  • Compression on one-page results. A one-page Outlook message we tested came back as an uncompressed 6,521,426-byte TIFF at the default 150 dpi; MultiPage=false and single-page PageRange values give the same kind of file.
  • Bilevel fax encodings: there is no CCITT Group 4 option, and even ColorSpace=monochrome keeps 8 bits per sample.
  • Attachment contents: the CSV and the JPEG photo are listed, not added as frames.
  • The Date row for messages saved without internet headers, and the Bcc line for every message.
  • Rich formatting held only in an RTF body that was not made from HTML; the plain-text body is used then.
  • Text you can search or copy. For that, convert to PDF with /v2/convert/msg/to/pdf.

Limits

  • One .msg per request; two files return 400.
  • Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
  • Each output file up to 512 MB. An uncompressed page grows with the square of the resolution: an A4 page at 300 dpi is about 26 MB.
  • Up to 2,000 pages per request; a frame over 16,000 px a side or 100,000,000 pixels returns 413.
  • A damaged .msg, or another Office 97-2003 file such as .ppt, returns 422.
  • 120 seconds per conversion.

Where teams use it

Retention copies of Outlook mail

Records programs that keep correspondence as image files can turn each exported .msg into one TIFF. Frame 1 carries the sender, recipients and date, so the image still identifies the message on its own.

Feeding a scanning or capture system

Capture and indexing software built around scanned TIFF batches can take Outlook messages as just another document. Choose the resolution your system expects, such as 200 or 300 dpi, with ImageResolution.

Questions

Why is a short message's TIFF so much bigger than a long one's?

Only TIFFs with two or more frames are LZW-compressed. A message that fits on one page is written as raw RGB, 3 bytes per pixel: our one-page test message was 6,521,426 bytes at 150 dpi, while the two-page sample is 415,682 bytes in one file. Lower ImageResolution, or use msg/to/png for single pages.

Can I get one TIFF per page?

Yes, with MultiPage=false: the sample then returns site-report-week-9-1.tiff and -2.tiff. Each of those is uncompressed, so expect much larger files than the combined TIFF.

Which dpi will my archive see?

The ImageResolution you send, stored as the X and Y resolution in inches (120 for the sample). If you send none, the pages are drawn at 150 dpi but the TIFF's resolution tags say 1 × 1 with no unit, so set it whenever the receiving system reads dpi.

Is an Outlook-only body format a problem?

Not when the file has an HTML body, as the sample does: that is what is drawn. When the HTML exists only inside the compressed RTF body (marked \fromhtml1), it is taken back out and drawn as HTML. Other RTF bodies fall back to the plain-text body, without their formatting.

Convert your first MSG file in a minute.