Skip to content
Docs menu

Convert to TXT

Plain Text. The API converts 22 formats to TXT. These are the options, by input format.

curl https://api.switchfile.io/v1/convert \
  -H "Authorization: Bearer $SWITCHFILE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/input.doc","to":"txt"}'

From 10 formats

doc, docm, docx, dot, dotm, dotx, fodt, odt, ott, rtf

  • passwordstringdefault: not set

    Password to open the file.

From PDF

  • pagesstringdefault: not set

    Pages to convert, for example 1-3,5 or all.

  • layoutbooleandefault: false

    Keep columns and spacing as they appear on the page.

  • passwordstringdefault: not set

    Password to open the PDF.

From 11 formats

azw, azw3, chm, epub, fb2, lrf, mobi, pdb, prc, rb, tcr

No options. The file is converted with the usual settings for TXT.