docx4j downloads

Docx4j Helper AddIn for Microsoft Word

Download/install this to generate docx4j Java code from within Word, see the XML, plus more.

source code

We'd like to encourage you to use the docx4j source code in your IDE, so we put this option near the top.

  1. Fork [optional but recommended]
  2. git clone your fork, or git clone
  3. Import the Maven pom in your IDE. In Eclipse, that's File > Import > Maven > Existing Maven Projects.

maven pom

docx4j is in Maven Central: Select one and only one of:

zip distribution for Java 8

Java 8 users will want

For convenience, that zip file includes the docx4j-JAXB-Internal jar. So if you are using Java 8, that is generally all you need.

If you want to use MOXy or the JAXB Reference Impl, instead you'll need:

Be sure to exclude the docx4j-JAXB-Internal jar!

zip distribution for Java 11

Java 11 users can use (or the earlier 8.x releases - see above)

You'll need:

development build

The latest dev build (if any) can be found in the /docx4j downloads directory.

Cheat sheet


Sample code

Sample code is not in Maven Central.

Zip files are available, docx4j 8.2.3:

For docx to pdf conversion, docx4j 8.2.3 can use documents4j (and Microsoft Word, running locally or remotely). Zipped up sample code:

You can also find these in the respective sub-directories at

For docx4j 11.1.8:

You can also find these in the respective sub-directories at

Docx4j properties

Sample properties file may be found at docx4j-samples-resources/src/main/resources/


To see docx4j logs, you'll need a concrete logging implementation. Config files for log4j2 and logback may be found in the sample resources

For convenience, the sample zips include the deps necessary for those 2 logging implementations. Note that these differ between docx4j 8 and docx4j 11