Want a dedicated tool For Achieving the below-mentioned result fast

Edit and Work visually to make a styled text or importing from MS-Word or RTF and get it's markaup HTML(the text with inline coding)

What I want to get is something similar :

<p class="home">
  <Span style="xxxxx">
    blah blah blah

Although it is HTML, but I want just the HTML's source of the text want to get it with a fast way

Any Tools/Tricks is appreciated



In Word you can save as HTML, which will produce something not entirely unlike your example.

Later versions of Word produce better HTML (early versions produced usable but unreadably repetitive and overcomplicated HTML) so you might want to clean it up

Some people like to create both HTML and RTF/DOC/DOCX from a Plain Text Markup using something like Pandoc

  • Yes I can get the code from a generated HTML,but Isn't there any faster way to generate the text with it's inline HTML code ? – Kasrak Jan 3 '12 at 15:54
  • @Sypress: Maybe I don't understand what you want. Can you update your question with some more detail or a small example? (P.S. see update to answer ref Pandoc) – RedGrittyBrick Jan 3 '12 at 16:01
  • I'll edit the post for more clarify, but before that I'm looking to what included in your answer – Kasrak Jan 3 '12 at 16:06
  • Edited with more clarification, thanks for your participation – Kasrak Jan 3 '12 at 16:27
  • Ok, I'll check them Pandoc seems to do the job but not as I expected , preferably want to do it visually,, and in your other post there are lot's of tools that will take a time to check them , could you suggest me a tool for doing the job I'm looking for – Kasrak Jan 3 '12 at 16:46

You could try unRTF.

  • Linux versions are provided at the above link.
  • Windows versions are here.
  • OS X lets you install it using Homebrew and brew install unrtf.

For example, let's create an RTF document.

enter image description here

Then convert it to HTML (which is the default setting).

unrtf test.rtf 

This is the output:

<!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN>
<meta http-equiv=content-type content=text/html charset=utf-8>
<!-- Translation from RTF performed by UnRTF, version 0.21.2 -->
<!--font table contains 0 fonts total-->
<!--invalid font number 0-->
<body><b><font size="3"><font color="#000000">This is a bold text<br>
<i>This is italics</i><br>
<u>This is underlined!</u></font></font></b></body>
  • this is what I want, but again seems that it's command-line utility, Preferably want to have copy-paste options or possibly could edit it visually – Kasrak Jan 3 '12 at 16:53
  • Well you can just keep both Word (or any RTF editor) and the command line open at the same time. Save the RTF file, run the command. – slhck Jan 3 '12 at 17:05
  • Yes I could, seems no any dedicated tool improved for what I'm looking for,thanks anyway, I'll try it – Kasrak Jan 3 '12 at 17:10
  • Well, you can redirect the output to another file and open it with an HTML editor like Notepad++? – slhck Jan 3 '12 at 17:52

On OS X, TextEdit can edit RTF and save as html. Here is an example of the sort of HTML it spits out:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <meta name="Generator" content="Cocoa HTML Writer">
   <meta name="CocoaVersion" content="1138.23">
   <style type="text/css">
      p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
    <p class="p1">this is a <b>test</b></p>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.