What this tool does
Convert Markdown to plain text by removing headings, bold, links, lists and other formatting syntax. You fill in these fields: Markdown. It shows plain text, characters, words, and lines.
Inputs
- Markdown: Longer text, up to 100000 characters.
How to use
- Type the markdown.
- Read the result: plain text, characters, words, and lines. It appears once every required field has a valid value.
- Use the copy button to copy the text.
- Use the download button to save the result as a file.
Worked examples
Example 1. Inputs:
- Markdown: "# Title This is bold and italic text. - one - two > quote [link](https:..."
Results:
- Characters: 58 (line breaks included)
- Words: 11
- Lines: 10 (blank lines included)
How this is worked out: Marks removed: '# ', '**', '*', '- ', '> ' and the link target. Text is 'Title' (5) + 2 line breaks + 'This is bold and italic text.' (4+1+2+1+4+1+3+1+6+1+5 = 29) + 2 + 'one' (3) + 1 + 'two' (3) + 2 + 'quote' (5) + 2 + 'link' (4) = 5+2+29+2+3+1+3+2+5+2+4 = 58 characters. Words: 1 + 6 + 2 + 1 + 1 = 11. Lines: Title, blank, sentence, blank, one, two, blank, quote, blank, link = 10.
Example 2. Inputs:
- Markdown: "Use
my_varand snake_case_name. ``js let a = 1 * 2;`` ~~old~~ new"
Results:
- Characters: 56 (line breaks included)
- Words: 10
- Lines: 5 (blank lines included)
How this is worked out: Backticks around my_var go. The underscores inside snake_case_name stay because they are inside a word. The two fence lines are dropped and the code line keeps its '*' untouched. '~~' goes. Characters: 'Use my_var and snake_case_name.' = 3+1+6+1+3+1+16 = 31; +2; 'let a = 1 * 2;' = 14; +2; 'old new' = 7; 31+2+14+2+7 = 56. Words: Use, my_var, and, snake_case_name = 4; let, a, 1, 2 = 4 (the lone '=' and '*' have no letter or digit, so they are not words); old, new = 2; 10 in all. Lines: sentence, blank, code, blank, 'old new' = 5.
Example 3. Inputs:
- Markdown: "## Café au lait 1. Mix <b>well</b> 2. See  and [docs][1..."
Results:
- Characters: 58 (line breaks included)
- Words: 12
- Lines: 6 (blank lines included)
How this is worked out: Heading mark, emphasis stars, list numbers, the b tags, the image and reference-link syntax, the rule line and the reference definition line are removed; the escaped star stays as '*'. The rule and the blank lines around it collapse to one blank line. Characters: 'Café au lait' = 4+1+2+1+4 = 12; +2; 'Mix well' = 8; +1; 'See menu photo and docs' = 3+1+4+1+5+1+3+1+4 = 23; +2; 'End * done' = 3+1+1+1+4 = 10; 12+2+8+1+23+2+10 = 58. Words: 3 + 2 + 5 + 2 = 12 (the lone '*' is not a word). Lines: Café, blank, Mix, See, blank, End = 6.
Example 4. Inputs:
- Markdown: "Title ===== > ## Note > - [x] done
a\*bMail <[email protected]> or <https://e..."
Results:
- Characters: 90 (line breaks included)
- Words: 12
- Lines: 8 (blank lines included)
How this is worked out: The row of equals signs under Title is a heading underline and goes. Inside the quote, the '> ' arrows, the '## ' mark, the '- ' bullet and the '[x] ' task box go; the code span keeps its backslash because nothing inside code is an escape. The angle brackets around the email and web address go, and the comment goes. '[ref]: address "title"' is a link definition and goes; '[Note]: keep this line' is ordinary text (three words follow the colon) and stays. Characters: 'Title' 5; +2; 'Note' 4; +1; 'done a\*b' = 4+1+4 = 9; +2; 'Mail [email protected] or https://example.com.' = 4+1+14+1+2+1+20 = 43; +2; '[Note]: keep this line' = 7+1+4+1+4+1+4 = 22; 5+2+4+1+9+2+43+2+22 = 90. Words: 1 + 1 + 2 + 4 + 4 = 12. Lines: Title, blank, Note, done, blank, Mail, blank, [Note] = 8.
Limitations
- List numbers and bullets are removed, so a numbered list becomes plain lines.
- Tables and footnotes are not interpreted. Table pipes, divider rows and footnote markers stay in the text.
- Anything between a less-than sign and a greater-than sign that starts with a letter is treated as an HTML tag and removed, even in a sum. HTML character codes, such as the one for an ampersand, are left as typed.
- Runs of blank lines are reduced to one blank line, and spaces at the end of a line outside a code block are removed.
- It reads common Markdown line by line and does not handle every edge case of the full specification, such as deeply mixed nesting, code indented by four spaces, or a link address that contains brackets.
FAQs
- Q: What is removed?
- A: Heading hashes and underlines, bold, italic and strikethrough marks, list markers, task boxes, block quote arrows, horizontal rules, link and image syntax, inline code backticks, code fences, HTML tags and comments, and reference link definitions.
- Q: What happens to links and images?
- A: A link keeps its visible text and loses its address. An image keeps its alt text. A bare address in angle brackets keeps the address.
- Q: What happens to code blocks?
- A: The fence lines are removed and the code between them is kept as written, except that a run of several blank lines becomes one.
- Q: Are snake_case names damaged?
- A: No. Underscores inside a word are left alone. Only underscores around whole words are treated as emphasis.
- Q: How are the words and characters counted?
- A: They are counted in the plain text result. A word is a run of characters between spaces that has at least one letter or digit, so a lone symbol is not a word. Characters include spaces and line breaks, and an emoji counts as one.
Explore Similar Tools
Explore more tools like this one:
- Text to Markdown - Turn plain text into Markdown: bullet and numbered lists...
- Markdown to HTML - Convert Markdown to clean HTML code instantly.
- Markdown Editor - A focused writing environment with standard markdown...
- HTML to Markdown - Convert HTML to clean, readable Markdown instantly.
- Markdown Preview - Real-time markdown rendering and HTML preview.