Convert Word (DOCX) to Markdown or HTML Online
Convert a Word .docx file to Markdown, clean HTML or plain text, keeping headings, bold / italic, links, numbered and nested lists and tables.
Result
Press “Run” to see the result.
The DOCX converter reads a Word document and rewrites its content as Markdown (default), clean HTML (format=html, no inline styles) or plain text. Headings come from the Word heading styles (Title, Heading 1–6), bold and italic runs become bold / _italic_, hyperlinks keep their URL, bulleted and numbered lists keep their nesting and numbering, and tables become Markdown or HTML tables.
Besides content, the answer lists the headings (an outline of the document), the title and author from the document properties, and stats (paragraphs, list items, tables, words, characters), handy to check an upload or to index the text in a search engine.
Images, comments, headers and footers and tracked changes are not converted. Old .doc files are not supported: save them as .docx first. Files are processed in memory within the file size of your plan and never stored.
Use this in your code
curl -X POST "https://apibox.io.vn/v1/docx-convert" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "0=@./my-file"const form = new FormData();
form.append('0', fileInput.files[0]);
const res = await fetch('https://apibox.io.vn/v1/docx-convert', {
method: 'POST',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
body: form,
});
console.log(await res.json());import requests
res = requests.post(
"https://apibox.io.vn/v1/docx-convert",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files={"0": open("my-file", "rb")},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/docx-convert');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
CURLOPT_POSTFIELDS => ['0' => new CURLFile('my-file')],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Are images kept?
No, only text, lists, links and tables are converted. Images, text boxes and comments are skipped.
Does it read .doc or .odt?
No, only .docx (Word 2007 and later). Save other formats as .docx first.
How are headings detected?
From the paragraph style: Title and Heading 1 give #, Heading 2 gives ##, and so on. Bold text in a normal paragraph is not treated as a heading.