Skip to content

Markdown to plain text

Remove headings, asterisks, links, code fences and pipe tables to get clean plain text.

Markdown input

0 words · 0 chars

How to use Markdown to text

  1. Load Markdown. Paste notes or AI chat replies into the editor, click Load sample, or drop .md files up to 10 MB.
  2. Choose output rules. Pick how Links, List items, and Table columns should flatten, then toggle frontmatter and code block options.
  3. Export plain text. Click Copy text for the clipboard, Save .txt for a single file, or Save ZIP when converting multiple files.

Everything you type stays on this device in your browser. Nothing is uploaded anywhere.

How AST parsing strips Markdown without breaking structure

An abstract syntax tree (AST) parser tokenizes headings, lists, blockquotes, and inline spans into typed nodes before rendering plain text. Regular-expression tools frequently delete underscores inside variable names or shatter multi-column tables, whereas structural parsing removes Markdown formatting cleanly by targeting only genuine markup tokens.

Before building the syntax tree, the converter normalizes \r\n and \r line endings into \n newlines and tracks live word, character, and stripped-syntax counts. To clean ChatGPT Markdown or capture formatted documentation, you can extract headings, lists and tables from screenshots first and paste the result here.

The parser follows the CommonMark 0.31.2 Specification so nested emphasis, escaped punctuation, and indented continuations behave predictably. Even when AI chat replies mix bold text inside bullet points with inline code spans, the AST isolates each node cleanly without leaving stray asterisks behind.

Block preprocessing and fenced code protection

Documents exported from web pages often mix raw HTML tags like </p>, </div>, or <section> alongside Markdown syntax. Outside fenced code blocks, the preprocessor inserts line breaks around closing block tags and strips <hr> dividers so adjacent paragraphs never merge into one line.

Fenced blocks marked by three or more backticks or tildes are tracked line by line during preprocessing. That state check guarantees HTML examples inside code snippets remain untouched rather than being rewritten as line breaks.

Line ending and blank line normalization

After rendering each AST block, blocks are joined with double newlines to keep clear paragraph separation. When Collapse extra blank lines is checked, any run of three or more consecutive newlines collapses down to a single blank line.

Unchecking Collapse extra blank lines leaves explicit spacing intact if a downstream template expects extra vertical gaps. Both single-file exports and combined batch previews apply the same normalization pass.

Three dedicated selectors in the options panel shape Links, List items, and Table columns for email clients, CMS fields, or spreadsheets without manual post-editing. Each control operates on parsed AST nodes rather than raw characters, keeping punctuation and cell values accurate.

GitHub-style extensions such as GFM pipe tables, task checkboxes, and strikethrough spans follow the GitHub Flavored Markdown Specification. When a table is wider than an email body can wrap, you can also keep wide GFM pipe tables aligned on landscape PDF pages instead of flattening them.

Control Option Output behavior Best destination
Links Keep link text only Drops URLs and keeps anchor labels Clean email prose and essays
Links Keep text and URL Formats label followed by URL in parentheses Plain-text reports and citations
Links URL only Discards anchor labels and outputs bare URLs Link audits and bookmark lists
List items Plain lines (no bullets) Removes bullet markers and numbers Paragraph summaries and forms
List items Keep dashes (- item) Adds - prefix with 2-space nesting Plain-text notes and changelogs
List items Numbered (1. item) Renders 1., 2. counters per indent level Step-by-step instructions
Table columns Tab-separated Joins cells with \t and drops pipes Excel, Google Sheets, and TSV
Table columns Space-aligned columns Pads columns with spaces and 2-space gaps Monospace emails and terminals
Table columns One cell per line Stacks each non-empty cell on its own line Narrow mobile screens and SMS

Selecting Keep link text only strips the brackets and destination URL, leaving readable sentences for newsletters or chat messages. Switching Links to Keep text and URL preserves reference addresses inline so readers can still see where a citation points.

Choosing URL only discards the descriptive label and keeps only the target address. Image syntax (![alt](src)) is handled alongside links by retaining its alt text when present.

Table column layouts for spreadsheets and emails

By default, Table columns uses Tab-separated mode, which removes pipe delimiters (|) and header separator dashes (:---) and joins cells with tabs. Pasting that result into Excel or Google Sheets places each row and column into separate cells.

When pasting into a monospace terminal or fixed-width plain-text email, Space-aligned columns calculates the widest cell per column and pads shorter cells with spaces separated by a two-space gutter. One cell per line stacks cells vertically with blank lines between rows for narrow mobile readers.

List styles and nested indentation

List items defaults to Plain lines (no bullets), turning bulleted and numbered items into clean lines without -, *, or 1. prefixes. Task-list checkboxes (- [x] and - [ ]) are stripped cleanly during inline parsing.

If you need hierarchy in plain text, Keep dashes (- item) and Numbered (1. item) preserve nested structure by indenting each sub-level by two spaces. Ordered lists maintain independent counters per nesting level and respect custom starting numbers.

Why strip YAML frontmatter, HTML tags, and fenced code blocks?

Static-site drafts, Obsidian notes, and developer READMEs frequently mix metadata headers, raw HTML wrappers, and multi-line code fences into prose. Stripping those non-prose elements prevents configuration keys and fence markers from cluttering plain-text emails, support tickets, or CMS summaries.

Frontmatter blocks enclosed between leading --- lines follow the YAML 1.2.2 Specification used by Hugo, Astro, Jekyll, and Eleventy. If your goal is a formatted office document rather than raw text, Convert Markdown to Word (.docx) turns those same headings, lists, and pipe tables into native Word styles instead.

Tip: Load the built-in Load sample fixture (sample-notes.md) to test frontmatter removal, task lists, pipe tables, blockquotes, and bash code fences side by side before opening your own files.

Stripping YAML metadata headers cleanly

Strip YAML frontmatter is checked by default so keys like title, author, date, and tags at the top of a file do not leak into plain-text copy. Unchecking it passes those header lines through as ordinary text when you want metadata preserved.

Batch processing multiple files into a ZIP

Click Open .md file or drop two or more .md, .markdown, or .txt files (up to 10 MB per file) onto the drop zone to enter batch mode. Each file card displays its byte size, resulting word count, stripped syntax character count, and a dedicated copy button.

When you click Save ZIP, the tool encodes every cleaned document as UTF-8 .txt with deduplicated filenames and compresses them into markdown-plain-text.zip using fflate at compression level 6. Single-file exports sanitize illegal path characters and cap the stem at 80 characters before saving .txt.

When should you strip Markdown vs export formatted files?

Strip Markdown to plain text whenever the destination field rejects markup, treats asterisks literally, or parses plain text directly, such as SMS alerts, CRM notes, support tickets, or spreadsheet cells. Keep formatted .docx or .pdf exports when visual hierarchy, clickable hyperlinks, and styled tables matter to readers.

The IETF RFC 7763 text/markdown Media Type specification notes that Markdown was designed to remain readable as plain text, yet raw pipe tables, nested URLs, and YAML headers still clutter emails and forms. Stripping syntax removes that visual noise in one pass while letting you verify exact length with a word and character count checker after cleanup.

Because every option updates the preview immediately as you type or paste, you can compare Keep link text only against Keep text and URL or switch table layouts before copying. Once satisfied, click Copy text or save the .txt file locally with zero server round-trips.

Questions

How are Markdown links and images handled in plain text?

You can choose between three link modes in the options panel. Keep link text only outputs the anchor label, Keep text and URL formats it with the web address in parentheses, and URL only extracts bare addresses. Image alt text is preserved when rendering inline runs.

Can I remove YAML frontmatter automatically?

Yes. Strip YAML frontmatter is enabled by default and removes any leading triple-dash metadata block before converting the body. Uncheck that box whenever you want to keep frontmatter keys and values inside the plain-text output.

What happens to fenced code blocks when converting Markdown to text?

Fenced markers such as triple backticks and tildes are always removed. Keep code block contents is checked by default so the inner commands or snippets remain intact, while unchecking it omits code blocks completely from the output.

How can I convert multiple Markdown files to TXT at once?

Drop two or more .md, .markdown, or .txt files into the drop zone or pick them with Open .md file. The workspace switches to batch mode, lists per-file word and stripped-character counts, and exports every cleaned file inside markdown-plain-text.zip.

Why do pipe tables paste cleanly into Excel or Google Sheets?

Table columns defaults to Tab-separated, which removes pipe borders and separator rows and joins each cell with a tab character. Pasting tab-delimited rows into spreadsheet software places every cell into its own column automatically.

Does stripping Markdown send my notes or AI drafts to a server?

No. Parsing, syntax stripping, and ZIP packaging run locally inside your browser tab using pure JavaScript. Your pasted text and opened files never leave your device over any network connection.

Updated