Developers and AI

Word to Markdown: convert DOCX, Excel and CSV files for AI

Convert Word, Excel or CSV files to clean Markdown for ChatGPT and Claude. Headings, lists and tables stay, and nothing is uploaded. Free, in your browser.

DealMahal team · Published 6 December 2026 · 7 min read

To convert Word to Markdown without uploading the file, open our free Word, Excel and CSV to Markdown tool, choose or drop your .docx file, and press Copy Markdown or Download .md. Word headings, lists, tables, bold, italic and links are kept, and images are marked as [image] so the AI knows something was there. The same tool turns Excel workbooks and CSV files into Markdown tables, one per sheet, and shows the token count so you know whether it fits your AI chat.

This guide covers what each part of a document turns into, how spreadsheets are handled, and how to trim a big file to fit a token budget.

Why Markdown is a good format for AI

Markdown is plain text with a few symbols for structure: # for a heading, - for a bullet, | between table columns. An AI chat or LLM app reads it easily, and you can read it too, so you see exactly what you are sending. Heading levels tell the model how sections relate, and table columns stay lined up instead of running together. CommonMark has a short Markdown reference, and the table format used here is described in the GitHub Flavored Markdown spec.

ChatGPT and other assistants can also take a file as an attachment, and OpenAI explains how in its help page on uploading files. Converting first is useful when you want to see and trim the text before it goes anywhere, paste it into a prompt, or feed it to a tool that only takes text.

Step by step: Word to Markdown

  1. Open Word, Excel and CSV to Markdown.
  2. Choose or drop your .docx file, up to 50 MB. It is read in your browser, not uploaded.
  3. Leave Show where images were ([image]) ticked if you want a marker where each picture was. Untick it to leave images out completely.
  4. Wait for the message "Converted" with your file name. Below it you see the size, the token count and the Markdown itself.
  5. Press Copy Markdown and paste it into your AI chat, or press Download .md to save a file with the same name as your document.

What each part of a Word document becomes

In WordIn the Markdown
Heading 1 to Heading 6 styles# to ######
Title and Subtitle styles# and ##
Bold, italic, strikethrough**bold**, *italic*, ~~struck~~
Bullet lists, nested- item, with sub items indented
Numbered lists1., 2., 3.
TablesMarkdown tables, first row as the header
Web and email links[text](address)
Images[image], or [image: alt text] when the picture has alt text
Comments, headers and footersLeft out

A few details matter for AI use:

  • Headings come from Word's heading styles. A line that only looks like a heading, because someone made Normal text big and bold, comes out as a bold paragraph. If the structure matters, apply Heading 1, Heading 2 and so on in Word before converting.
  • Tables keep their columns. A cell merged across columns is followed by empty cells so the row still has the right width. A line break inside a cell becomes <br>, and a | inside a cell is escaped so it does not split the column.
  • Only web and email links stay links. Links that start with http, https or mailto keep their address. Other links keep their text only.
  • Text that looks like Markdown is escaped. A paragraph that happens to start with "1." or "#" gets a backslash, so the AI does not mistake it for a list or a heading.

Old .doc files are not read. You will see: "Old Word .doc files are not supported. Please open it in Word and save it as .docx, then try again." A damaged or password protected file gets a short message explaining that it could not be read and how to save it again as .docx.

Excel to Markdown

Drop an .xlsx, .xlsm, .xls or .ods file and every sheet with data becomes a heading and a Markdown table. For example, a small sheet called Prices would come out like this:

## Prices

| SKU | Item | Price |
| --- | --- | --- |
| 00412 | Desk lamp | $24.00 |
| 00413 | Shelf | $89.50 |

The options above the result:

  • Sheets to include. Shown when the workbook has more than one sheet. Each sheet is listed with its rows and columns. Hidden sheets are marked "hidden sheet" and start unticked.
  • First row is the header. Untick it if the sheet has no header row; the columns are then called Column 1, Column 2 and so on.
  • Remove empty rows and columns. On by default, which saves tokens on sheets with gaps.
  • Add each sheet name as a heading. The ## Prices line in the example.
  • Maximum rows per sheet (empty = all). See the token section below.

Cells keep the value Excel shows, so formatted numbers and dates look as they do on screen. Formulas are not copied, only their last saved results. A merged cell appears in its first cell. Long numbers such as account or order IDs, which Excel shows as 1.23457E+15 in the General format, keep every digit, because the AI needs the real value; our post on long numbers in scientific notation explains why Excel does that. Each sheet is read up to 1,048,576 rows and 1,000 columns. A password protected workbook gets the message to remove the password in Excel and try again.

CSV to Markdown

CSV, TSV and TXT files work the same way, as a single table. The separator is found for you from comma, semicolon, tab and pipe, and a .tsv file is always read as tab separated. The text encoding is detected too: UTF-16 when the file starts with a UTF-16 marker, otherwise UTF-8, falling back to Windows-1252 for older exports. Values are kept exactly as written, so 00412 stays 00412. Quoted fields with commas or line breaks inside are read correctly, and the heading option uses the file name instead of a sheet name.

Fit your token budget

Under the buttons, a line shows the size of the result, for example: "Size: 18,240 characters, 4,512 OpenAI tokens (o200k_base, exact), about 4,100 to 5,200 Claude tokens (estimate). Use the row limit to fit a token budget." (The figures here are only an example.) The OpenAI count is exact for the o200k_base encoding; the Claude figure is an estimate, shown as a range.

If a big spreadsheet is too large for the model you use:

  1. Untick sheets you do not need.
  2. Type a number into Maximum rows per sheet. The Markdown and the token count update a moment later.
  3. A note tells you what was cut, for example that the first 500 of 12,000 rows of a sheet are included.

For a full breakdown across models, with context window fit and cost, paste the Markdown into our token counter.

Your file stays on your device

The file is opened by your browser and converted on your device. Word files are read in a background worker on the same page, with a two minute limit so a very complex file cannot freeze the tab. Nothing is sent to DealMahal or anywhere else, which matters for contracts, internal reports and customer lists. If the document holds email addresses or other private details the AI does not need, paste the Markdown into our private data redactor first. It swaps common kinds of private data for tags such as [EMAIL_1]; it finds patterns, not everything, so review the result.

Limits and file types

ItemValue
File types.docx, .xlsx, .xlsm, .xls, .ods, .csv, .tsv, .txt
File size50 MB, one file at a time
Rows read per sheet1,048,576
Columns1,000
Not supportedOld .doc files, PDFs, password protected files

For PDFs, use PDF to Markdown. Going the other way, from an AI answer back into a spreadsheet, is covered in our guide to copying a ChatGPT table to Excel.

Check the Markdown before you rely on it. The note under the result lists what was left out, and a quick read is the surest way to catch a table that came through differently than you expected.

Frequently asked questions

How do I convert a Word document to Markdown?

Open the Word, Excel and CSV to Markdown tool, choose or drop your .docx file, then press Copy Markdown or Download .md. Headings, lists, tables, bold, italic and links are kept, and the file is read in your browser.

Can I convert an old .doc file?

Not directly. Open it in Word, save it as .docx, then convert the .docx. Password protected files need the password removed first.

What happens to Excel formulas?

Each cell keeps the value Excel shows, which is the last saved result of the formula. The formulas themselves are not copied.

My spreadsheet is too big for the AI. What can I do?

Untick the sheets you do not need and set a maximum number of rows per sheet. The token count under the result updates, so you can see when it fits.

Are my files uploaded?

No. Word, Excel and CSV files are read by your own browser and converted on your device. Nothing is sent to DealMahal or anyone else.

Spotted an error? Write to dealmahal.official@gmail.com.

Questions or corrections: dealmahal.official@gmail.com.

Keep reading

All posts