This text converter turns plain text or Markdown into a Word document, a PDF, an RTF file, a web page, an EPUB e-book or an image, and turns lines of text into CSV, JSON, XML, SQL or an Excel file. Paste your text or choose a .txt or .md file, pick the format and press Convert. It all runs in your browser, so your text is never uploaded.
How to use the text converter
- Paste your text or choose a file.
- Say whether it is plain text or Markdown.
- Pick the format to convert to.
- Press Convert, then download the file or copy the text.
Plain text and Markdown
With plain text, a blank line starts a new paragraph and a line break inside a paragraph is kept. With Markdown, the converter keeps headings, paragraphs, bullet and numbered lists, block quotes, code blocks, horizontal rules, bold and italic text, inline code and links. Images in Markdown are replaced by their description, since the converter makes text documents.
Word, PDF and the other documents
The Word file is a .docx document with real headings, lists and a code style, so it can be edited and restyled in Word. The PDF uses Letter pages with one-inch margins and the standard Helvetica and Courier fonts. Those fonts can only draw Western European characters, so any other character, such as a Chinese or Arabic letter, is shown as a question mark and counted in a note. For text in other scripts, use the Word or HTML option. The HTML option makes a complete web page, and the Markdown option writes plain text as Markdown, adding backslashes to characters that Markdown would otherwise act on.
RTF
Wikipedia describes Rich Text Format as a document file format developed by Microsoft, and says it is not a markup language. A file starts with an opening brace and the rtf1 control word, and a backslash starts each control word. Most RTF files are plain ASCII, because other characters are written as escapes. A Unicode character is written as a backslash, the letter u, a signed 16-bit number and a fallback character for programs that do not read Unicode. The converter writes every character above ASCII this way, so accented letters and symbols survive.
EPUB
Wikipedia explains that an EPUB is a ZIP archive of XHTML files, with the media type application/epub+zip. The mimetype file must be the first file in the archive and must be stored uncompressed. A META-INF folder holds container.xml, which points to the file that defines the contents of the book. The converter writes all of this, with a navigation document and a table of contents. Chapters start at each top-level heading, or the whole text is one chapter if there are no headings. Give the book a title and, if you like, an author. Check the result in your reading app, since reading apps differ in how strictly they follow the format.
Images
The PNG and JPG options draw your text on a white picture 900 pixels wide, with headings in larger bold type and code in a gray box. The picture grows with the text up to a height of 16,000 pixels, and longer text is cut at that point. This is handy for sharing a note as a picture.
CSV, JSON, XML, SQL and Excel
For the table formats, each non-empty line becomes a row. The converter splits each line into columns at tabs, commas, semicolons, pipes or spaces, which it can find by itself, or it keeps each line as one column. Tick the box if the first line holds column names. CSV follows the quoting rules Wikipedia describes for RFC 4180: a field with a comma, a double quote or a line break is put in double quotes, and a double quote inside is written twice. JSON gives a list of objects when you have column names, a list of lists otherwise, and a list of strings when each line is one column. The XML output wraps each row in a row element. SQL gives INSERT statements, and the Excel option gives a real .xlsx file, with plain numbers stored as numbers.
Files and limits
You can choose a file of up to 2 MB, or paste up to two million characters. A file whose name ends in .md or .markdown is treated as Markdown. The file is read on your device and the result is built there. Downloads are named converted-text with the right ending, such as .docx or .pdf, and you can rename them afterwards. The text results, such as HTML, RTF, Markdown, CSV, JSON, XML and SQL, also appear in a box so you can copy them without downloading.
Which format should I choose?
Choose Word if the document will be edited, PDF if it will be read or printed as it is, and RTF if you need a format that older programs can open. Choose HTML for a web page and EPUB for an e-book reader. Choose an image for sharing a short note in a chat. For data, choose CSV or Excel for spreadsheets, JSON for programs and XML for systems that expect it.
Common mistakes
- Choosing Markdown for plain text. Characters such as stars and hash marks would be treated as formatting.
- Expecting every language in the PDF. Use Word or HTML for other scripts.
- Forgetting the column names box. Tick it if the first line is a header.
- Using a very long text for an image. The picture is cut at 16,000 pixels.
What next
Use this often? Add TXT to CSV to your Home screen.
Frequently asked questions
What is a text converter?
A tool that turns plain text or Markdown into another format, such as Word, PDF, RTF, HTML, EPUB, an image, CSV, JSON, XML, SQL or Excel.
Can it convert Markdown to PDF or Word?
Yes. Choose Markdown as the input and PDF or Word as the output. Headings, lists, quotes, code blocks, bold, italic and links are kept.
Why do some characters appear as question marks in the PDF?
The PDF uses the standard fonts, which draw only Western European characters. Use Word or HTML for other scripts.
How are lines turned into columns?
Each line is split at tabs, commas, semicolons, pipes or spaces. The converter can find the separator by itself.
Is my text uploaded?
No. Everything is converted in your browser.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.