From word to clean html

Use this free online tool to convert Microsoft Word documents to HTML code. It extracts all text content from a word doc into downloadable and clean HTML.

By default, it produces very tidy HTML code from a word doc. This clean HTML option is probably the best format option for most people. It produces classless elements in a clear, readable format.

However, there are a few things to note. The HTML code will have empty image src tags so you’ll have to reference your online images for those to work, and it’s generally not good with HTML lists.

Other than that, it works pretty well and is super handy if you’re looking to quickly convert content from a word doc into a usable HTML format.

Note: here’s the old version of Word to HTML if you need to use it.

Convert Word to HTML File Revisions

This free tool has been recently revised to use word document uploads instead of using a manual process like the old Word to HTML version of this converter.

With a click of a button, you can now automatically save the document conversion results as a downloadable HTML page. This tool makes it easy to instantly convert Word to HTML without having to paste the document.

The old version of this Word to HTML converter relied on copying and pasting the content from an open Word doc which was a clunkier process. This new version allows direct Word document uploads and outputs HTML files or copyable clean code making for a far better process.

I hope you enjoy this newly revised word to HTML tool. It really is much better now at converting Word documents.

Most Popular Text Tools

Alphabetical Tools

Random Generators

Line Break Tools

Fun Text Tools

Text Changing Tools

SEO and Word Tools

Content Conversion Tools

HTML Code Generators

HTML Compression

HTML Encoding Tools

I realize this question is old but the other answers never really answered the question. If you are not adverse to writing some PHP code, the CubicleSoft Ultimate Web Scraper Toolkit has a class called TagFilter:

https://github.com/cubiclesoft/ultimate-web-scraper/blob/master/support/tag_filter.php

You pass in two things: An array of options and the data to parse as HTML.

For cleaning up broken HTML, the default options from TagFilter::GetHTMLOptions() will act as a good starting point. Those options form the basis of valid HTML content and, doing nothing else, will clean up any input data into something that another tool like Simple HTML DOM can correctly parse in a DOM model.

However, the other way to use the class is to modify the default options and add a ‘callback’ option to the options array. For every tag in the HTML, the specified callback function will be called. The callback is expected to return what to do with each tag, which is where the real power of TagFilter comes into play. You can keep any given tag and some or all of its attributes (or modifying them), get rid of the tag but keep the interior content, keep the tag but get rid of the content, modify the content (for closing tags), or get rid of both the tag and interior content. This approach allows extremely refined control over the most convoluted HTML out there and processes the input in a single pass. See the same repository’s test suite for example usage of TagFilter.

The only downside is that the callback has to keep track of where it is at between each call whereas something like Simple HTML DOM selects things based on a DOM-like model. BUT that’s only a drawback if the document being processed has things like ‘id’s and ‘class’es…most Word/Libre HTML content does not, which means it is a giant blob of unrecognizable/unparseable HTML as far as DOM processing tools go.


Download Article

Save your .docx as an .html web page file


Download Article

  • Using Microsoft Word
  • |

  • Using Google Drive
  • |

  • Using Word 2 Clean HTML
  • |

  • Video
  • |

  • Q&A
  • |

  • Tips

If you have Microsoft Word on your computer, you can resave the DOC/DOCX file as an HTML file without installing additional software. If you don’t have Word or prefer a free online option, you can upload the document to Google Drive and save it as an HTML file. Or, paste the contents of the Word file into a converter like Word 2 Clean HTML. Since Word documents and HTML files are very different, the finished HTML webpage may not contain the same formatting as the original. This wikiHow will show you how to convert a Word document to HTML on your Windows PC or Mac.

Things You Should Know

  • In Microsoft Word, go to File > Save As. Change the file type to Web Page.
  • For Google Drive, upload and open the Word file in Google Docs. Then, go to File > Download > Web Page.
  • Try an HTML conversion web app like Word 2 Clean HTML for additional automatic formatting options.
  1. Image titled Convert a Word Document to HTML Step 1

    1

    Open the document in Microsoft Word. Word has a built-in feature to convert .docx documents to HTML files. Although the resulting HTML code may be a bit bulkier than if you’d written the HTML from scratch, the conversion is quick and can be used for simpler projects.[1]

    • If you’re looking for general HTML tips, check out how to create a simple web page, create a link, and make radio buttons.
  2. Image titled Convert a Word Document to HTML Step 2

    2

    Click the File menu. It’s at the top-left corner of Word.

    Advertisement

  3. Image titled Convert a Word Document to HTML Step 3

    3

    Click Save As. A list of locations will appear.

  4. Image titled Convert a Word Document to HTML Step 4

    4

    Select a location. You can save the file to any folder on your computer (or a cloud drive).

  5. Image titled Convert a Word Document to HTML Step 5

    5

    Type a name for the file. Enter the name in the textbox next to “File name:”.

  6. Image titled Convert a Word Document to HTML Step 6

    6

    Select Web Page from the «Save as type» dropdown menu. This will save the file in HTML format.

    • If you’re okay with losing some of the advanced layout code in favor of a simpler file, select Web Page, Filtered instead. This keeps only the style instructions, content, and some other info.
  7. Image titled Convert a Word Document to HTML Step 7

    7

    Click Save. A new version of the file is now saved in the HTML format.

  8. Advertisement

  1. Image titled Convert a Word Document to HTML Step 8

    1

    Go to https://www.google.com/drive in a web browser. Then click Go to Drive. As long as you have a Google account, you can use Google Drive to convert a Word document to a web page.

  2. Image titled Convert a Word Document to HTML Step 9

    2

    Click the + New button. It’s at the top-left corner of Google Drive.

  3. Image titled Convert a Word Document to HTML Step 10

    3

    Click File upload. It’s the second option.

  4. Image titled Convert a Word Document to HTML Step 11

    4

    Select your Word document and click Open. This uploads the Word document to your Google Drive.

  5. Image titled Convert a Word Document to HTML Step 12

    5

    Right-click the Word document in Google Drive. A pop-up context menu will open.

  6. Image titled Convert a Word Document to HTML Step 13

    6

    Click Open with. Another menu will expand.

  7. Image titled Convert a Word Document to HTML Step 14

    7

    Click Google Docs. The contents of your Word document will display in Google Docs.

  8. Image titled Convert a Word Document to HTML Step 15

    8

    Click the File menu in Google Docs. It’s just below the file name at the top-left corner of the document.

  9. Image titled Convert a Word Document to HTML Step 16

    9

    Click Download. Additional menu options will appear.

  10. Image titled Convert a Word Document to HTML Step 17

    10

    Click Web Page. This allows you to save the .docx as an HTML zipped file. If prompted to do so, click Save or OK to start the download.

  11. Advertisement

  1. Image titled Convert a Word Document to HTML Step 18

    1

    Go to https://word2cleanhtml.com in a web browser. Word 2 Clean HTML is a free, easy-to-use tool that will take the contents of a Word document and convert it to HTML code.

  2. Image titled Convert a Word Document to HTML Step 19

    2

    Open the Word document you want to convert. If you have Microsoft Word, open the document in that application. If not, you can either use the free version of Word located at https://www.office.com to open the file, or a Word alternative like Google Drive.

  3. Image titled Convert a Word Document to HTML Step 20

    3

    Copy the contents of the Word file to the clipboard. Press the Control and A keys (PC) or Command and A keys (Mac) at the same time to highlight everything in the file, right-click the highlighted area, and then click Copy.

  4. Image titled Convert a Word Document to HTML Step 21

    4

    Paste the copied text into the Word to Clean HTML field. Right-click the typing area and select Paste to paste the selected content.

  5. Image titled Convert a Word Document to HTML Step 22

    5

    Adjust your HTML preferences below the form. Use the checkboxes at the bottom of the page to toggle conversion preferences, such as converting Word’s Smart Quotes to regular ASCII quotes.

  6. Image titled Convert a Word Document to HTML Step 23

    6

    Click the convert to clean html button. It’s the button below the form. This converts the content to the HTML format and displays it in the text area.

    • To see the regular HTML (not «cleaned up») from the conversion, click the Original HTML tab.
    • To see a preview of how the code would look in a web browser, click the Preview tab.
    • To copy the code so you can paste it elsewhere, click the Copy cleaned HTML to clipboard link at the top of the page.
  7. Advertisement

Add New Question

  • Question

    What do I do if I did this accidentally and really want to delete it now?

    Community Answer

    If you want to delete it, right-click on it and click delete. If you want to change it back, rename the file extension from randomfile.html to randomfile.docx.

  • Question

    I want to convert a Word document with controls (text box) to an HTML file, which has those controls. How do I do this?

    Community Answer

    Change the ending from whatever it is (ex: .txt) to .html (ex: .html).

  • Question

    If I save a Word document as a web page using HTML, will it have an URL?

    Community Answer

    Yes it will because you are basically making a website and all websites have a URL.

See more answers

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

  • If you have to convert hundreds of files to HTML, use commercial software that can convert them all at once. Some options are Doc Converter Pro (formerly Word Cleaner) and NCH Doxillion.

  • It is not always possible to keep all of your Word formatting and styles during the conversion, and still have the HTML file display consistently on all browsers. You might need to use CSS to achieve this on your website.

  • Looking for money-saving deals on Microsoft Office products? Check out our coupon site for tons of coupons and promo codes on your next subscription.

Thanks for submitting a tip for review!

Advertisement

References

About This Article

Article SummaryX

«To use Microsoft Word to convert a Word document to HTML, start by opening the document in Word. Click the File menu and choose Save as. Choose where you want to save the file, and then give it a name. Click the «»Save as type»» menu and select Web Page. Click Save to save your new HTML code to the desired location.
To use Google Drive, start by signing in to Google Drive in a web browser. Click the New button and select File upload. Select the Word document and click Open to add it to your Drive. Once the upload is complete, right-click the document in drive, select Open with, and then select Google Docs. When you see the document, click the File menu, select Download, and choose the Web Page option. This downloads a ZIP file of your new HTML to your computer.
»

Did this summary help you?

Thanks to all authors for creating a page that has been read 768,193 times.

Is this article up to date?

Понравилась статья? Поделить с друзьями:
  • From word doc to jpg
  • From word doc to jpeg
  • From word doc to excel
  • From word 2003 to pdf
  • From wiki to word