# Convert web formats In this article, you will learn how to convert documents to HTML format with GroupDocs.Conversion for Java. ## About HTML and other web file formats HTML (Hyper Text Markup Language) is the extension for web pages created for display in browsers. Known as the language of the web, HTML has evolved with requirements of new information to be displayed as part of web pages. It takes many file types when building a webpage. Web file formats define the standards for the development of webpages and are related to the platform in which these are built. A complete website can be built consisting of static as well as dynamic web pages. Common web file extensions and their associate file formats include HTML (HyperText Markup Language), ASP (Active Server Pages), XML (Extensible Markup Language), CSS (Cascading Style Sheets), JSON (JavaScript Object Notation), and others. ## Supported web file conversions {{< include file="/conversion/java/_includes/supported-conversions/web.md" type="page" >}} ## Convert from web formats With [GroupDocs.Conversion](https://products.groupdocs.com/conversion/java/) you can easily convert web format into another file format. For example, HTML to PDF conversion code snippet looks like this: {{< tabs "convert-html-to-pdf">}} {{< tab "Java" >}} ```java import com.groupdocs.conversion.Converter; import com.groupdocs.conversion.options.convert.PdfConvertOptions; // Load the source HTML file Converter converter = new Converter("sample.html"); // Set the convert options for PDF format PdfConvertOptions options = new PdfConvertOptions(); // Convert to PDF format converter.convert("converted.pdf", options); ``` {{< /tab >}} {{< /tabs >}} Put it simply - you just load an HTML file into the `Converter` class, select the desired output format and **GroupDocs.Conversion** does all the rest. {{< alert style="info" >}} Refer to the [API reference](https://reference.groupdocs.com/conversion/java/com.groupdocs.conversion.options.convert/package-summary) for more conversion options and customizations. {{< /alert >}} ### Convert to web formats On the other hand, converting your files to web formats is also quite simple and natural. The following code snippet shows how to convert a PDF document to HTML format in Java using [GroupDocs.Conversion](https://products.groupdocs.com/conversion/java). {{< tabs "convert-pdf-to-html">}} {{< tab "Java" >}} ```java import com.groupdocs.conversion.Converter; import com.groupdocs.conversion.options.convert.WebConvertOptions; // Load the source PDF file Converter converter = new Converter("sample.pdf"); // Set the convert options for HTML format WebConvertOptions options = new WebConvertOptions(); // Convert to HTML format converter.convert("converted.html", options); ``` {{< /tab >}} {{< /tabs >}}