OnlineTextLab
Esc

TXT to RTF Converter

Plain text into an RTF file with a font and size, readable by almost any word processor.

Nothing here yet

Options

Runs on your device. Your files and text are not uploaded.

About TXT to RTF

RTF is the format to choose when you do not know what will open the file. A plain .txt shows whatever font the reader's editor picks and can garble accents, while a .docx needs fairly recent software. An RTF file carries a font and size and opens in Word, WordPad, TextEdit, LibreOffice and many specialist systems that take document imports.

It is a good fit for pasting text into older record systems, sending a formatted note to someone on unknown software, or setting a fixed-width font on a file so that its columns line up. You can look at the generated code as well as download it, which helps if you are feeding RTF into another system.

How it works

Every line of your text becomes an RTF paragraph ending in \par, and blank lines are kept. The characters RTF reserves for itself, which are backslash and both braces, get escaped, and tabs become \tab. Everything outside basic ASCII is written as a \u code, so the finished file contains only ASCII bytes and cannot be damaged by a program that guesses the encoding wrong.

A detail many generators miss is that the RTF specification stores \u values as signed 16-bit numbers. Anything above 32767, which includes both halves of an emoji, has to be written as a negative number, so the grinning face emoji becomes \u-10179?\u-8704?. The ? after each code is the fallback an old reader shows if it does not understand Unicode. The file header declares Windows-1252 and a one-character fallback width, and lists the font you chose in its font table.

How to use TXT to RTF

  1. Type or paste into Your text, press Open a .txt file, or use Try an example.
  2. Open Options to choose the font and size, and add a title for the file properties if you want one.
  3. Press Create RTF file. You see the generated RTF code along with the stats.
  4. Press Download .rtf, or Copy to paste the code into another system.

Generated by the tool

Input
Meeting notes

Agenda
- Budget: €12,000
- Café booking
Output
{\rtf1\ansi\ansicpg1252\uc1\deff0{\fonttbl{\f0\fswiss Arial;}}
\pard\f0\fs24
Meeting notes\par
\par
Agenda\par
- Budget: \u8364?12,000\par
- Caf\u233? booking\par
}

The euro sign and the accented letter are written as Unicode codes, so the file is pure ASCII. \fs24 means 12 point, because RTF counts font size in half points.

When it helps

  • Importing text into an older records or case system that accepts RTF but not DOCX
  • Keeping fixed-width columns lined up by setting Courier New in the file
  • Sending a note that will open with the same font on Windows and Mac without Office
  • Generating an RTF sample to test how another program handles encoded characters

Tips for a better result

  • Choose Courier New for logs, tables or anything aligned with spaces. In a proportional font those columns drift.
  • If the recipient has any recent word processor, TXT to DOCX gives more options for page size and spacing, while RTF here leaves page layout to the program opening it.
  • Fonts in RTF are requests. If the reader's computer lacks the font, the file's family setting (Swiss, Roman or Modern) tells the program what sort of font to substitute.

Good to know

  • There are no headings, bold, lists or tables. It is one font and one size, because plain text has no structure to map to them.
  • Page size and margins are not set, so the opening program uses its defaults.
  • Old readers without Unicode support show ? for characters outside ASCII. That is uncommon today but does happen in some embedded systems.
  • Emoji are encoded correctly, but whether they appear depends on the fonts of the program reading the file.

Questions people ask

Why choose RTF over DOCX?

Reach. RTF is plain ASCII and has been readable for decades, including by systems that have never heard of DOCX. If you know your reader has a modern word processor, DOCX is the better choice.

Why is the file bigger than my text?

Each non-ASCII character becomes a code such as \u8364?, and the header takes a little space. A text full of Chinese or Cyrillic can grow several times over, since each character takes about eight bytes.

Is the title printed on the page?

No. It goes in the RTF info block, which programs show as a document property. Put it in your text if you want it on the page.

What to use next

Last reviewed . Read our editorial policy.