Convert RTF Files to DOCX in Java

Empower your Java applications with document conversion features across 135+ popular image and file formats without requiring any additional software.

Download Free Trial

About GroupDocs.Conversion for Java API

GroupDocs.Conversion for Java is an advanced file formats conversion API to convert between popular images and document formats like Microsoft Office, OpenDocument, PDF, HTML, Email, CAD and many more using a few lines of code. The native API auto-detects the source document formats and offers a plenty of options to customize the converted documents. Along with the document information-extraction feature, it also supports caching conversion result to the local disk by default. However any type of cache storage can be supported by implementing appropriate interfaces – Amazon S3, Dropbox, Google Drive, Windows Azure, Reddis or any other.

Steps for Converting RTF to DOCX in Java

GroupDocs.Conversion makes it easy for developers to convert the RTF file to DOCX in few lines of code.

  • Create a new instance of Converter class and load the RTF file with full path
  • Set ConvertOptions for the DOCX document type
  • Call the convert() method and pass the document name (full path) and format (DOCX) as parameter

System Requirements

A basic conversion with GroupDocs.Conversion for Java APIs can be done with just a few lines of code. Our APIs are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installled on your system.

  • Operating Systems: Microsoft Windows, Linux, MacOS
  • Development Environment: NetBeans, Intellij IDEA, Eclipse etc
  • Java Runtime Environment: J2SE 6.0 and above
  • Get the latest version of GroupDocs.Conversion for Java from Maven

// Load the source RTF file to be converted
Converter converter = new Converter("input.rtf");
// Get the convert options ready for the target DOCX format
ConvertOptions convertOptions = new FileType().fromExtension("docx").getConvertOptions();
// Convert to DOCX format
converter.convert("output.docx", convertOptions);

RTF to DOCX Live Demos

Convert RTF to DOCX right now by visiting GroupDocs.Conversion Live Demos website.
The live demo has the following benefits

No need to download GroupDocs API.

No need to write any code

Just upload the source file to have an instant display.

Get the download link to save the file on your machine.

About DOCX File Format

Docx is well-known format for Microsoft Word documents. Introduced from 2007 with the release of Microsoft Office 2007, the structure of this new Document format was changed from plain binary to a combination of XML and binary files. Docx files can be opened with Word 2007 and lateral versions but not with the earlier versions of MS Word which support DOC file extensions.

Read More

Other Supported Conversions

You can also convert RTF into many other file formats. Please see the complete list below.

RTF TO EPUB

(Digital E-Book File Format)

RTF TO XPS

(Open XML Paper Specification)

RTF TO TEX

(LaTeX Source Document)

RTF TO PPT

(PowerPoint Presentation)

RTF TO PPS

(Microsoft PowerPoint Slide Show)

RTF TO PPTX

(PowerPoint Open XML Presentation)

RTF TO PPSX

(PowerPoint Open XML Slide Show)

RTF TO ODP

(OpenDocument Presentation File Format)

RTF TO OTP

(Origin Graph Template)

RTF TO POTX

(Microsoft PowerPoint Open XML Template)

RTF TO POTM

(Microsoft PowerPoint Template)

RTF TO PPTM

(Microsoft PowerPoint Presentation)

RTF TO PPSM

(Microsoft PowerPoint Slide Show)

RTF TO XLS

(Microsoft Excel Binary File Format)

RTF TO XLSX

(Microsoft Excel Open XML Spreadsheet)

RTF TO XLSM

(Microsoft Excel Macro-Enabled Spreadsheet)

RTF TO XLSB

(Microsoft Excel Binary Spreadsheet File)

RTF TO ODS

(Open Document Spreadsheet)

RTF TO XLTX

(Microsoft Excel Open XML Template)

RTF TO XLTM

(Microsoft Excel Macro-Enabled Template)

RTF TO TSV

(Tab Separated Values File)

RTF TO XLAM

(Microsoft Excel Macro-Enabled Add-In)

RTF TO CSV

(Comma Separated Values File)

RTF TO DOC

(Microsoft Word Document)

RTF TO DOCM

(Microsoft Word Macro-Enabled Document)

RTF TO DOCX

(Microsoft Word Open XML Document)

RTF TO DOT

(Microsoft Word Document Template)

RTF TO DOTM

(Microsoft Word Macro-Enabled Template)

RTF TO DOTX

(Word Open XML Document Template)

RTF TO RTF

(Rich Text File Format)

RTF TO ODT

(Open Document Text)

RTF TO OTT

(Open Document Template)

RTF TO TXT

(Plain Text File Format)

RTF TO MD

(Markdown)

RTF TO TIFF

(Tagged Image File Format)

RTF TO TIF

(Tagged Image File Format)

RTF TO JPG

(Joint Photographic Expert Group Image File)

RTF TO JPEG

(JPEG Image)

RTF TO PNG

(Portable Network Graphic)

RTF TO GIF

(Graphical Interchange Format File)

RTF TO BMP

(Bitmap File Format)

RTF TO ICO

(Microsoft Icon File)

RTF TO PSD

(Adobe Photoshop Document)

RTF TO WMF

(Windows Metafile)

RTF TO EMF

(Enhanced Metafile Format)

RTF TO WEBP

(Raster Web Image File Format)

RTF TO SVG

(Scalable Vector Graphics File)

RTF TO JP2

(JPEG 2000 Core Image File)

RTF TO EMZ

(Enhanced Windows Metafile Compressed)

RTF TO WMZ

(Windows Metafile Compressed)

RTF TO HTML

(Hyper Text Markup Language)

RTF TO MHT

(MIME Encapsulation of Aggregate HTML)

RTF TO MHTML

(MIME Encapsulation of Aggregate HTML)