Interchange Document Standard.rtfMIME: application/rtf, text/rtf

RTF Format Specification: The Cross-Platform Document Interchange Standard

Understand 7-bit ASCII control words, font tables, character escaping, and PDF conversion workflows.

Rich Text Format (RTF) is a proprietary document file format developed by Microsoft in 1987 for cross-platform document interchange between Microsoft Word, Apple Pages, LibreOffice, and generic text editors. Unlike plain text (.txt), RTF supports rich text formatting like bold, italics, font sizing, colored text, margins, and bulleted lists using human-readable 7-bit ASCII control words (e.g. `\b` for bold, `\i` for italic, `\par` for paragraph).

Format Specification & Header Signature

Core file signatures, developer metadata, and standard RFC specifications:

Magic Bytes (Hex Signature)7B 5C 72 74 66 ({\rtf)
MIME Media Typeapplication/rtf, text/rtf
Standard / SpecificationMicrosoft RTF 1.9.1 Specification
Initial Developer / OrganizationMicrosoft Corporation (1987)
Character Encoding7-bit ASCII with Unicode escape sequences (`\uN?`)
Syntax StructureNested bracket groups containing control words and plain text
Font & Color TableDeclared in document header: `\fonttbl` and `\colortbl`
Initial CreatorMicrosoft Corporation (Version 1.0 to 1.9.1)

Operating System & Browser Compatibility Matrix

Where .rtf is natively supported without third-party codecs:

Platform / EnvironmentNative SupportImplementation Notes
Universal System SupportSupportedWindows WordPad, macOS TextEdit, Word, Google Docs, LibreOffice.

Advantages of Rich Text Format

  • •Universal word processing compatibility: opens natively in Windows WordPad and macOS TextEdit without Microsoft Office
  • •Immunity to macro viruses: standard RTF cannot execute VBA macro scripts, making it safer than legacy `.doc` files
  • •Text-based format: can be generated and parsed with basic string manipulation scripts

Limitations & Trade-Offs

  • •Excessive file size for complex documents compared to zipped XML (.docx) archives
  • •Discontinued by Microsoft in 2008 with no updates for modern typography features
  • •Inconsistent rendering of advanced multi-column tables across different office suites

The Group and Control Word Syntax of RTF

An RTF file is organized into groups enclosed in curly brackets `{}`. A group begins with a control word like `{\b This is bold}`. Formatting applies strictly within that bracket scope and automatically reverts outside it.

Special non-ASCII characters are encoded as 16-bit decimal Unicode values prefixed by `\u` (for example, `\u8212?` represents an em-dash).

Frequently Asked Questions about Rich Text Format

Is RTF safer than DOC or DOCX?

Yes! RTF does not support embedded executable macros or active script payloads, making RTF documents a safer format for exchanging contracts and legal drafts without malware risk.