Skip to content

Document Mail Merge

Fills {{placeholder}} fields in a .docx template once per CSV row — even when Word split a field across runs — and zips one document per row.

A certificate of employment for forty people is one template and forty rows. The reason a naive find-and-replace fails is that Word saves even a single {{name}} as several fragments, split wherever the spell-checker or a font boundary fell — so the text you are searching for is not in the file as one string.

🔒 Runs entirely in your browsermail-mergetemplatebatchdocx

Template (.docx)

A Word template with {{name}} fields

Fields are found in the body, headers, footers and footnotes.

Data (CSV)

A CSV whose column names match the field names

Read in this tab. Nothing is uploaded. Files from Korean, Japanese, Chinese and Western Excel (CP949, Shift_JIS, GBK, Windows-1252) are recognised.

Word saves even a single {{name}} as several fragments, split at a spell-check or font boundary. This joins the fragments inside a paragraph to find the field, and applies the first fragment’s formatting — bold, font, size — to the value it puts there. A newline in a value becomes a line break, and < and & go in safely. Files never leave this tab.

How to use it

  1. Write {{fields}} into the Word template

    Anywhere in the body, a header, a footer or a footnote. The page lists the fields it found so you can check they match your CSV.

  2. Drop a CSV whose column names match

    Fields with no column are listed, and so are columns the template never uses — the two lists together are how a mismatch is caught before forty documents are made.

  3. Set the file naming rule

    Use {{column}} in the name so each document is called something you can find — a folder of document-1.docx is not that.

  4. Preview a row, then build the zip

    The preview shows the filled text of one row. Step through a few before generating the lot.

Common questions

Is the formatting of the template kept?

Yes. The value takes the formatting of the first fragment of the field it replaced — bold, font, size — so a bold {{name}} produces a bold name. Only the text changes; the preview shows text alone for that reason.

Can a value contain a line break?

Yes — a newline in the CSV becomes a line break in the document rather than a literal \n. Angle brackets and ampersands are escaped safely too.

A field was left as {{name}} in the output.

There is no CSV column with that name. The page warns before you build and lists exactly which fields have no column — rename the column to match, spaces and all.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.