Skip to content
pdfconversionapi

DOC to ODT API

POST /v2/convert/doc/to/odt turns a Word 97-2003 file into an OpenDocument Text package, version 1.3. The 26,112-byte sample came back as a 4,917-byte .odt with the body text, the shaded table and the picture, but without its header, footer or footnote.

Endpoint
POST /v2/convert/doc/to/odt
Accepts
doc
Sample timing
26 ms 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/doc/to/odt \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@loan-agreement.doc \
  -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 OK26 ms median1 file, 4.8 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.026,
  "Files": [
    {
      "FileName": "loan-agreement.odt",
      "FileExt": "odt",
      "FileSize": 4917,
      "FileData": "UEsDBAoAAAAAAAAAIQBexjIM…"
    }
  ]
}

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 loan-agreement.odt, rendered by the API
Input
loan-agreement.doc (26 KB)
Output
loan-agreement.odt (4.8 KB)
Source
A two-page equipment loan agreement for a fictional sailing club, written for this site and saved in the Word 97-2003 format, with a shaded table, a footnote, a picture and page-numbered footers. (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
UpdateFieldsboolean, default falseRefresh fields such as a table of contents before the ODT is written. Our sample has no field in its body, so the .odt is the same with or without it.
UpdateTableOfContentsboolean, default falseSame switch as UpdateFields.
UpdateReferencesboolean, default falseSame switch as UpdateFields.
FileNamestringBase name of the .odt: FileName=loan-2027 gives loan-2027.odt.
StoreFileboolean, default falseGet a link to the .odt instead of the file; it expires 3 hours later.

What carries over, and what doesn't

Kept

  • Body text, the four Heading 1 headings (as text:h) and the numbered conditions (as a text:list)
  • Both tables, with the navy header fill (#1f3c78) and the light blue rows (#e8eef8)
  • The burgee picture, stored as Pictures/image1.png
  • The hyperlink, bold words and the red underlined warning (#c01c1c)
  • A4 page size (595.3 by 841.9 points) and the 22 mm side margins
  • Title, author and description in meta.xml

Lost or not yet supported

  • The page header, the "Loan agreement, page 1 of 2" footer and its page fields: styles.xml has no header or footer.
  • The footnote. Its text is not in content.xml.
  • Exact borders. Cells get a thin black 0.5 pt line, so the navy borders turn black and the signature table, which had no borders, gets them.
  • Heading fonts: the headings were set in Calibri and the .odt names only Times New Roman for the text.

Limits

  • Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
  • 120 seconds per conversion, then 504.
  • Protected .doc files don't convert here yet. Without Password the answer is 422 "the input file is password-protected"; with the correct password it is 400 "password-protected DOC files can't be converted to ODT yet". An unprotected file sent with Password converts as usual.

Where teams use it

Records that must be kept in an open format

Some public bodies require OpenDocument for documents they archive or publish. Convert old Word 97 files once, and keep the .doc next to the .odt, because headers and footnotes are not carried over yet.

Opening old files in editors that prefer ODF

Collaborative editors and desktop suites that store ODF natively can work on the converted body text and tables directly, without a .doc import step every time.

Questions

Which OpenDocument version is written?

ODF 1.3: office:version="1.3" in the package, with the mimetype application/vnd.oasis.opendocument.text stored first, as the standard requires.

Why are the header and footer missing?

The converter does not write header or footer content into the .odt yet. If you need them, convert to DOCX with /v2/convert/doc/to/docx, which kept both in our test, or keep the original .doc.

Can I go straight from .doc to an ODF file with page numbers?

Not in one step today. For a fixed layout with the footer and page numbers, /v2/convert/doc/to/pdf lays out every page. For an editable ODF file, expect to add the header and footer again after conversion.

Convert your first DOC file in a minute.