How to Convert HTML Tags to Formatted Text in Microsoft Word
Question details
The user needs to convert inline HTML tags (such as <b> and <i>) within a Word document into actual text formatting (bold and italic).

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Editing a text document that contains raw HTML code and needing to display it as standard, visually formatted text without the tags.
- Observed behavior
- The document displays the raw HTML tags alongside the text instead of rendering the enclosed text with the appropriate font styles.
If you plan to run VBA macros or perform batch Find and Replace operations, always create a backup copy of your document first to prevent accidental data loss.
Use a Web Browser to Render and Copy the Text
This is the simplest method for basic HTML content, relying on a web browser to natively render the tags before pasting them back into Word.
Web browsers are designed to read and execute HTML tags automatically. By saving your text as an HTML file, you can bypass manual replacements.
Copy your raw text containing the HTML tags and paste it into a plain text editor like Notepad. Save the file with a '.html' extension (e.g., document.html).
Right-click the newly created HTML file and choose 'Open with', then select your preferred web browser (such as Chrome or Edge).
Once the webpage loads, the text will be displayed with proper formatting instead of visible tags. Highlight all the text and press Ctrl + C to copy it.
Open a blank Microsoft Word document and press Ctrl + V to paste the content. The bold and italic formatting will be preserved.
Use a VBA Macro with Wildcard Find and Replace
For users who prefer to process tags in place without leaving the Word application, a VBA macro can automate the conversion using wildcards.
Easily Render HTML Documents in WPS Office
WPS Office Writer seamlessly handles HTML files. You can open files containing HTML tags directly in WPS Writer, and it will automatically render tags like <b> and <i> into formatted text without needing complex VBA macros or workarounds.
- 1. Save HTML Code: Save your raw text with HTML tags as an .html file on your computer.
- 2. Open with WPS Writer: Launch WPS Office, click 'Open', and select your .html file. WPS Writer will natively render the formatting.
- 3. Save as Document: Go to 'Menu' > 'Save As' and select 'Microsoft Word Document (*.docx)' to finalize the conversion.

Frequently Asked Questions
Can I convert HTML tags in Word without using VBA?
Yes. You can use the manual 'Advanced Find and Replace' feature. Press Ctrl + H, click 'More', and check 'Use wildcards'. Search for \<b\>(*)\</b\> and replace it with \1, making sure to click 'Format' > 'Font' to set the replacement to Bold.
Why are my HTML tags showing as plain text in Word?
If you paste raw HTML code directly into a standard Word document, Word treats the tags as literal text characters rather than rendering instructions. To render them, the content must be loaded as an HTML file.
Does this wildcard method work for complex HTML tables?
No, wildcard Find and Replace is best suited for simple inline formatting tags like bold, italics, or underline. Complex structures like tables, divs, or CSS styles require rendering through a web browser or native HTML importer.




