The Rich Text Format (often abbreviated RTF) is a document file format developed by Microsoft in 1987 for cross-platform document interchange. Most word processors are able to read and write RTF documents.
It should not be confused with enriched text (mimetype "text/enriched" of RFC 1896) or its predecessor Rich Text (mimetype "text/richtext" of RFC 1341 and 1521) which are completely different specifications.
All subsequent releases of Microsoft Word for the Macintosh and all versions of Microsoft Word for Windows have included built-in RTF readers and writers which translate from RTF to Word's .doc format and from .doc to RTF.
The format is still owned by Microsoft to this date; as of March 2008 it is up to version 1.9.1.
{rtf1ansi{fonttblf0fswiss Helvetica;}f0pard
This is some {b bold} text.par
}
would be rendered like this when read by an appropriate word processor:
This is some bold text.
A backslash () starts an RTF control code. The par control code indicates the end of a paragraph, and b switches to a bold typeface. Braces ({ and }) define a group; the example uses a group to limit the scope of the b control code. Everything else will be treated as clear text, or the text to be formatted. A valid RTF document is a group starting with the rtf control code.
'c8 will encode the Arabic letter beh (ب).If a Unicode escape is required, the control word u is used, followed by a 16-bit signed decimal integer giving the Unicode codepoint number. For the benefit of programs without Unicode support, this must be followed by the nearest representation of this character in the specified code page. For example, u1576? would give the Arabic letter beh, specifying that older programs which do not have Unicode support should render it as a question mark instead.
The control word uc0 can be used to indicate that subsequent Unicode escape sequences within the current group do not specify a substitution character.
.doc are, in contrast, binary formats with only a few scraps of legible text.Nowadays, human-readable XML-based formats are becoming more common, but at RTF's release its level of readability was rare among document formats. Note that the XML-based OpenDocument and Office Open XML formats are often not immediately human-readable because they are a bundle of several different files within a ZIP archive.
The WordPad editor in Microsoft Windows creates RTF files by default. It once defaulted to the Microsoft Word 6.0 file format, but write support for Word documents was dropped in a security update.
The free and open-source word processors AbiWord, OpenOffice.org, and KWord can view and edit RTF files.
The default editor for Mac OS X, TextEdit, can also view and edit RTF files.