Home / Guides

Remove Markdown From Text: Asterisks, Hashes and Links

Published 2026-11-07

To remove Markdown from text, strip the symbols that mark formatting: asterisks around bold words, hashes in front of headings, backticks around code and the brackets and address in links. You can do it by hand with find and replace, or switch on one option in a cleaner. This guide shows how to remove Markdown from text pasted from AI chats and notes apps, which syntax the cleaner handles, and which patterns to use for the rest.

Why Markdown shows up in copied text

Markdown is a plain-text way to write formatting. Typing **word** means bold, a line starting with # is a heading, and - or * at the start of a line makes a list. A program that understands Markdown turns those symbols into real formatting. A program that does not shows the symbols as they are.

AI chat tools write their answers in Markdown. Depending on the interface and on how you copy, you may get styled text or the raw symbols. Using a Copy button often gives the raw Markdown, and dragging to select the displayed text often gives the styled version. Notes apps, README files and documentation sites are other common sources.

MarkdownMeaningPlain result
**bold** or __bold__Bold textbold
*italic* or _italic_Italic textitalic
~~gone~~Strikethroughgone
# Heading to ###### HeadingHeadings, level 1 to 6Heading
- item, * item, + itemBulleted list- item
1. itemNumbered list1. item (numbers are kept)
`code`Inline codecode
[label](address)Linklabel
> quoteBlock quotequote
---Horizontal rule(a blank line)

Remove Markdown with the cleaner

  1. Open the AI Text Cleaner.
  2. Tick Strip Markdown formatting in the options. It is off by default.
  3. Paste your text into the input box.
  4. Copy the cleaned text from the output box.

Here is a small example of what happens:

Input:
## Summary
**Key point:** run `npm install`.
* First item
* Second item
See [the docs](https://example.com).

Output:
Summary
Key point: run npm install.
- First item
- Second item
See the docs.

Exactly what the option handles

HandledHow
Headings # to ######The hashes and the space after them are removed. A hash with no space, such as a hashtag, is left alone
Bold with ** or __The markers are removed and the words stay
Italic with * or _Markers removed. An underscore inside a word, as in snake_case, is left alone
Strikethrough ~~Markers removed
Inline code in backticksBackticks removed
Fenced code lines that start with ```The fence lines are removed. The code between them stays
Links and images [label](address)Replaced by the label. The address is dropped
Block quote markers > at the start of a lineRemoved
Horizontal rules made of three or more -, * or _The line is cleared
Bullets *, + and •Converted to - , so lists stay readable

Web addresses written out in the text are protected, so an underscore or asterisk inside a URL is not damaged.

What it leaves alone

The option is meant for prose. It removes backticks and asterisks everywhere, so leave it off when the text is code, a formula or a regular expression.

Remove Markdown from text by hand with find and replace

For anything the option does not cover, use find and replace with regular expressions switched on. In Visual Studio Code, click the .* button first. Most editors write a captured group in the replacement as $1.

RemoveFindReplace with
Bold\*\*(.+?)\*\*$1
Italic with asterisks\*(.+?)\*$1
Headings^#{1,6}\s+nothing
Links\[([^\]]+)\]\([^)]+\)$1
Inline code`([^`]+)`$1
Bullet markers^(\s*)[-*+]\s+$1-
Block quote markers^>\s?nothing

Run the bold pattern before the italic one. Otherwise the italic rule eats half of each double asterisk and leaves stray markers. If you only need to remove the double asterisks, a plain find and replace of ** with nothing works in Word, Google Docs and any other editor, with no regular expressions needed.

A tool for whole files

For converting whole Markdown files, the command-line tool Pandoc can write plain text from a Markdown source:

pandoc input.md -t plain -o output.txt

It understands tables, nested lists and footnotes, which the options above do not. If you want styled text instead of plain text, a Markdown preview in an editor shows the rendered result, which you can copy.

Problems you may hit

Quick answers

How do I remove asterisks from text? Tick Strip Markdown formatting in the cleaner, or find ** and replace it with nothing for bold markers.

How do I remove hashtags-style headings from copied text? Remove the leading # characters and the space after them. The cleaner does it, and the pattern ^#{1,6}\s+ does it in an editor.

Does removing Markdown change the words? No. It removes the symbols and keeps the text, apart from the addresses inside links.

Turn on Strip Markdown formatting. It is off by default, so switch it on before you paste, and leave it off for code. Open the AI Text Cleaner

Related guides