What markdown to text conversion does
Markdown is plain text with symbols that mean formatting: # for a heading, ** for bold, [text](url) for a link. Converting markdown to text removes those symbols and keeps the words, so the result reads cleanly in an email, a form, a text field or a document that does not render markdown.
It is a common step after copying an answer from a chat tool, where headings, bold text and bullet lists arrive as symbols. The text underneath is fine, and only the symbols get in the way.
A worked example
A small markdown note:
# Weekly notes
The **launch** went well, see the [report](https://example.com/report) and .
- [x] Fix the `login` bug
- [ ] Write the _release_ notes
- Check the changelog
> Remember: ship small changes.
| Team | Tasks |
|------|------:|
| Web | 4 |
| API | 7 |With the default options it becomes:
Weekly notes
The launch went well, see the report and chart.
- [x] Fix the login bug
- [ ] Write the release notes
- Check the changelog
Remember: ship small changes.
Team Tasks
Web 4
API 7The heading marker, bold, backticks and underscores are gone. The link kept its text, the image kept its alt text, the quote lost its > and the table became rows with tab characters between the cells. List items kept their dashes and their indentation.
How each part of markdown is handled
- Headings: the # signs are removed, the title text stays on its own line. Underlined headings with === are handled too.
- Bold, italic and strikethrough: the markers are removed when they come in pairs. A lone asterisk or an underscore inside a word, as in
snake_case, is left alone. - Links: the text is kept. With Text followed by (address) you get
the report (https://example.com/report). Reference links, where the text is followed by a label in square brackets, work too, and the definition lines are removed. Web addresses in angle brackets become plain addresses. - Images: the alt text is kept, or the whole image is removed.
- Lists: bullets written with
*,+or-all become a dash. Numbered items keep their numbers. Checkboxes are kept as they are. - Quotes: the
>marks are removed, nested ones too. - Code: backticks around inline code are removed and the code stays. Fenced blocks lose their fence lines and keep their content, or are removed if you turn Keep code blocks off. Markdown inside code is not touched.
- Tables: the separator row is dropped and cells are joined with a tab, which pastes into a spreadsheet as columns.
- Rules and comments: horizontal rules, HTML comments and YAML front matter at the top of a file are removed.
Convert markdown to plain text without losing structure
Plain text has no formatting, so structure has to come from line breaks and spacing. The converter keeps your paragraph breaks and collapses long runs of empty lines into one. Lists keep their markers so you can still see which lines belong together, and nested items keep their indentation.
If you want the opposite and need bare lines, switch off Keep list markers. To then turn the lines into a single paragraph, use Remove Line Breaks. To clean up spacing afterwards, use Remove Extra Spaces.
Markdown to text for tables and HTML
Tables are the one place where markdown to text is not a pure removal. Cells have to go somewhere, so they are joined with tabs. To turn tables into real files instead, the reverse direction is covered by CSV to Markdown and HTML Table to Markdown.
Markdown can also contain raw HTML such as <b>bold</b>. This tool leaves HTML as it is. If your text has tags, run it through Remove HTML Tags as well.
Command line and code options
For files on your machine, Pandoc can write plain text from markdown:
pandoc notes.md -f markdown -t plain -o notes.txtIn code, most people render markdown to HTML with a library and then read the text of that HTML. That follows the full markdown specification, while this page uses simpler rules aimed at everyday notes and chat output.
Limits
- Bold or italic that starts on one line and ends on another is not matched, so its markers stay. Each line is treated on its own.
- Code blocks made only of four-space indentation are not detected, because they look like nested list text. Use fences.
- Footnotes, math and definition lists are left as written.
- A star between two characters with no spaces, as in 2*3*4, is read as italic markers, the way the markdown specification reads it, so the result is 234.
- The result is plain text, not a faithful rendering. Complex or unusual markdown may need a quick read-through.
The conversion happens in your browser. What you paste is not uploaded or stored. See the Privacy Policy for details.