Word Document to plain text

Convert a Microsoft Word document to plain text in the browser.

Face with waiting expression Nothing to see yet!

Loading takeymakey...
TakeyMakey code
Want this tool to do something else? Edit the code below and make it do whatever you want.
({
  take: [
    {
      key: "buffer",
      type: "file",
      label: "Document",
      accept: ".doc,.docx,application/msword",
      read: "buffer",
    },
    {
      type: "import",
      value: "https://cdn.jsdelivr.net/npm/mammoth@1.4.17/mammoth.browser.js",
    },
  ],
  make: async (arrayBuffer) => {
    let value

    if (arrayBuffer) {
      value = (await mammoth.extractRawText({ arrayBuffer })).value
      return [{ type: "text", value }]
    }
  },
})