About RTF to TXT
RTF has been around since 1987, and it still turns up: exports from legal and medical record systems, old word processors, mail clients, and archive folders. Open one in a text editor and you see {\rtf1\ansi followed by codes everywhere, with your words scattered among them.
This takes an .rtf file, or RTF code you paste in, and gives you just the words. That is useful for pulling text from a system export into something else, or for rescuing an old document on a machine with nothing installed that opens RTF.
How it works
RTF is a small language of nested groups in braces, with commands that start with a backslash, so it needs real parsing. A quick strip of the codes leaves junk: the font table comes out as Arial;, and picture data as long runs of hex. This reader tracks group depth, and when it meets a group such as a font table, color table, stylesheet, document info block or embedded picture, it skips the whole group. Page headers, footers and footnotes are skipped the same way.
Special characters are decoded in both the forms RTF uses. A code like \'e9 is a byte in the document's code page, which is read from its \ansicpg setting, so \'92 in the usual Windows-1252 becomes a curly apostrophe and not a control character. A Unicode code like \u8364? becomes the euro sign, and the fallback character that follows it, which is there for old readers, is correctly dropped so you do not get doubles. Commands such as \par, \tab, \cell and \emdash become the characters they stand for, and hidden text marked \v is left out.
How to use RTF to TXT
- Press Select an RTF file or drop one here. To use code instead, open Or paste RTF code and paste it, or press Try an example.
- The text appears right away, with counts of words, characters and lines.
- Press Download .txt to save it, or Copy to put it on your clipboard.
What the parser removes and decodes
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0 Arial;}}{\colortbl;\red0\green0\blue0;}
{\info{\author Sam}}\f0\fs24 Caf\'e9 menu\par
\b Today\b0 : soup \'96 \u8364?4.50\par
}Café menu
Today: soup – €4.50Arial, the color table and the author name do not leak through. The \'96 became an en dash by way of Windows-1252, and \u8364? became a euro sign with its fallback question mark removed.
When it helps
- Getting text out of an export from an older records or practice-management system
- Recovering words from old letters kept as RTF
- Processing RTF notes with a script that only understands plain text
- Checking what an RTF file really contains, without opening it in a word processor
Tips for a better result
- RTF code copied from a mail or log file sometimes arrives with extra line breaks. That does no harm, since line breaks in RTF code are ignored and only
\parstarts a new line. - Tables come out with cells separated by tabs. Paste them straight into a spreadsheet to get columns back.
- If you see question marks, the document's fallback characters are all that is left, which happens when another program has already flattened it. Go back to the original file if you can.
Good to know
- All formatting is dropped, including bold, colors and fonts. That is what makes the result plain text.
- Embedded pictures and objects are dropped entirely, not described.
- Footnotes and headers are skipped, so anything you need from them must be copied separately.
- Text in legacy per-font character sets, such as a Symbol font or a document that changes code page by font, is decoded with the document's main code page and can come out wrong. Unicode RTF from modern software is not affected.
Questions people ask
Why do other converters leave “Arial;” at the top of my text?
Because they remove RTF commands with a simple pattern, which leaves the words inside the font table behind. This one skips that whole group, as RTF readers are meant to.
Will accented letters and curly quotes come through?
Yes. Both Unicode codes and code page bytes are decoded, including Windows-1251 Cyrillic and other single-byte pages named in the file.
What if I paste something that isn't RTF?
You get a message saying so, because RTF must begin with {\rtf. If you have a Word file, DOCX to TXT is the tool you want.
What to use next
- TXT to RTF: to go the other way
- DOCX to TXT: for the same job on Word files
- Word Counter: to analyze the extracted text
Last reviewed . Read our editorial policy.