By Arthur Teboul//Updated /10 min read/Tutorial

Markdown Strikethrough: Syntax and Fix Guide (2026)

Markdown Strikethrough: Syntax and Fix Guide (2026)

TL;DR: Markdown strikethrough wraps text in double tildes — ~~like this~~ — to render as crossed-out text. The syntax is a GitHub Flavored Markdown (GFM) extension, not part of the core CommonMark specification. It works on GitHub, GitLab, VS Code, Obsidian, Reddit, and most modern Markdown renderers. The HTML output is a <del> tag. The most common mistake is adding spaces between the tildes and the text.

Markdown strikethrough is one of the most searched formatting features for writers who need to show deleted, corrected, or deprecated text without removing it entirely. The syntax is simple — two tildes on each side — but the details matter: single versus double tildes, platform-specific behavior, nesting with bold or italic, and silent failures when spacing is wrong.

This guide covers the complete strikethrough syntax, a platform compatibility table across 10 renderers, combination formatting, common mistakes, and how to preview strikethrough text on macOS. If you need to control line breaks inside your strikethrough text, see the markdown line break guide for the four methods that work across renderers.

How Does Markdown Strikethrough Work?

Markdown strikethrough wraps text in double tildes (~~) to produce crossed-out text in the rendered output. The parser converts ~~deleted text~~ into <del>deleted text</del> in HTML, which browsers display with a horizontal line through the middle of the text.

The syntax comes from GitHub Flavored Markdown (GFM), which added strikethrough as an extension to the CommonMark specification. Section 6.5 of the GFM spec defines the rules: a strikethrough sequence is a string of one or two ~ characters that is not preceded or followed by a ~ character. In practice, double tildes (~~) are the safe default because every GFM-compatible parser supports them, while single tilde behavior varies.

The CommonMark specification (version 0.31.2) does not include strikethrough at all. Strikethrough is purely an extension — which means support depends on the renderer. Most modern tools support it, but strict CommonMark-only parsers will render the tildes as literal text.

Key distinction: Strikethrough is a GFM extension, not core Markdown. The original Markdown specification by John Gruber (2004) has no strikethrough syntax. GFM added it as part of its superset of CommonMark, and the double-tilde convention has since been adopted by most platforms independently.

How Do You Write Markdown Strikethrough?

Type two tildes (~~), then your text, then two more tildes (~~). No spaces between the tildes and the text. That is the complete syntax — three elements, exact order. The GFM specification (section 6.5) defines this as a "strikethrough extension" where content between matching tilde sequences is wrapped in <del> tags.

Step 1: Open with double tildes

Start with two tilde characters. The tilde key is typically at the top-left of US/UK keyboard layouts, below Escape:

~~

Step 2: Add your text immediately

Type the text you want struck through directly after the opening tildes. Do not insert a space:

~~This text will be crossed out

Step 3: Close with double tildes

End with two more tildes immediately after the last character of your text:

~~This text will be crossed out~~

Complete examples

Here are practical examples showing common strikethrough uses:

~~Deprecated function~~ — use the new API instead.
 
Price: ~~$49.99~~ $29.99
 
~~TODO: fix the login bug~~ Done in v2.1
 
The meeting is at ~~3 PM~~ 4 PM.

Each of these renders with a visible horizontal line through the struck text, making it clear what changed while preserving the original content for context. I use the price-change pattern (~~$49.99~~ $29.99) frequently in product documentation — it is the most common real-world use case for markdown strikethrough outside of revision tracking.

What Is the Difference Between Single and Double Tildes?

The GFM specification (section 6.5) defines strikethrough sequences as "a string of one or two ~ characters." This means the spec technically allows both ~single~ and ~~double~~. In practice, platform behavior diverges significantly.

SyntaxGFM specGitHub.comGitLabObsidianVS CodePandoc
~~double~~YesYesYesYesYesYes (with ext)
~single~YesYesNoYesNoYes (with ext)

GitHub.com renders both single and double tildes as strikethrough, matching the full GFM spec. GitLab and VS Code only support double tildes. Obsidian supports both. Pandoc requires the strikeout extension and supports both variants.

Recommendation: Always use double tildes (~~). Double tildes work on every platform that supports strikethrough. Single tildes fail silently on GitLab, VS Code, and several other renderers — your text appears with literal tilde characters instead of being crossed out.

How Do You Combine Strikethrough with Other Formatting?

Markdown strikethrough nests with bold, italic, inline code, and links. The GFM specification treats strikethrough as an inline-level extension, meaning it can wrap any other inline formatting. The order of the markers matters: the outermost markers are parsed first, so place strikethrough tildes on the outside when combining with emphasis.

Strikethrough with bold

Wrap the bold markers inside the tildes:

~~**This is bold and struck through**~~

Renders as: This is bold and struck through

Strikethrough with italic

Same principle — italic markers inside the tildes:

~~*This is italic and struck through*~~

Renders as: This is italic and struck through

Strikethrough with bold and italic

All three combined:

~~***Bold, italic, and struck through***~~

Strikethrough with inline code

Inline code inside strikethrough works on most platforms, though some renderers (notably GitHub) apply the strikethrough line over the code background:

~~`deprecated_function()`~~ → use `new_function()`

Links inside strikethrough render as clickable crossed-out text:

~~[Old documentation](https://example.com/old)~~ → [New docs](https://example.com/new)

Strikethrough inside lists

Strikethrough works inside all list types — ordered, unordered, and checkbox lists:

- ~~Buy groceries~~ Done
- Cook dinner
- [x] ~~Submit report~~ Completed Friday
- [ ] Review pull requests

Which Platforms Support Markdown Strikethrough?

Strikethrough is a GFM extension adopted by most modern Markdown renderers, but support is not universal. Here is a breakdown of 10 major platforms.

PlatformStrikethrough supportSyntax acceptedHTML output
GitHubYes~~double~~ and ~single~<del>
GitLabYes~~double~~ only<del>
VS Code previewYes~~double~~ only<del>
ObsidianYes~~double~~ and ~single~<del>
TyporaYes~~double~~ only<del>
RedditYes~~double~~ only<del>
Stack OverflowYes~~double~~ only<del>
BitbucketYes~~double~~ only<del>
PandocYes (with strikeout ext)Both<del> or <s>
CommonMark strictNoN/ALiteral ~~text~~

Nine out of ten platforms render double-tilde strikethrough. Only strict CommonMark parsers without extensions reject it. GitHub and Obsidian are the two major platforms that also accept single-tilde syntax. I tested ~~strikethrough~~ across all ten platforms in the table above — double tildes rendered correctly on every platform that claims support, while ~single tildes~ failed silently on GitLab, VS Code, Reddit, Stack Overflow, and Typora.

When previewing Markdown files locally on macOS, rendering depends on your viewer. Most code editors with Markdown preview panels (VS Code, IntelliJ) support GFM strikethrough. Dedicated Markdown viewers like MacMD Viewer render strikethrough natively along with full GFM support — including syntax highlighting, Mermaid diagrams, and table formatting.

You can test strikethrough rendering without installing anything by using our free Markdown to HTML converter. It uses a GFM-compatible parser that handles strikethrough, tables, and task lists.

What Are Common Markdown Strikethrough Mistakes?

Four syntax errors account for nearly all broken strikethrough rendering. Every mistake involves spacing or tilde count — and all of them fail silently. The parser renders your tildes as literal characters instead of applying the strikethrough style, with no error message.

Mistake 1: Spaces between tildes and text

The most common error. Adding a space after the opening tildes or before the closing tildes breaks the syntax on most parsers:

~~ This breaks — space after opening tildes ~~
~~This works — no spaces between tildes and text~~

The GFM spec requires that the content begin and end immediately adjacent to the tilde sequences. A space character between ~~ and the text means the parser does not recognize it as a strikethrough delimiter.

Mistake 2: Mismatched tilde count

The opening and closing sequences must use the same number of tildes. Mixing single and double tildes produces unpredictable results:

~~This breaks~ — one tilde closing, two opening
~This also breaks~~ — two tildes closing, one opening
~~This works~~ — matching double tildes

Mistake 3: Strikethrough across paragraphs

Strikethrough does not span across blank lines. A blank line ends the current paragraph, and the parser treats the tildes as unmatched:

~~This will not work because there is
a blank line in the middle
 
of the struck text~~

To strike through multiple lines, keep them in the same paragraph (no blank lines) or apply strikethrough to each paragraph separately.

Mistake 4: Using tildes inside code blocks

Tilde characters inside inline code or fenced code blocks are treated as literal text, not as Markdown formatting:

`~~This is code, not strikethrough~~`

This is expected behavior — code spans disable all Markdown processing. If you need to show strikethrough syntax as an example (like this guide does), wrap it in backticks.

How Does Markdown Strikethrough Render in HTML?

When a GFM-compatible parser processes ~~struck text~~, it produces a <del> HTML element:

<del>struck text</del>

The <del> tag is semantically correct for indicating deleted text. According to the HTML specification, <del> represents a range of text that has been removed from the document. Browsers render it with a line-through text-decoration by default.

Some parsers (notably Pandoc) output <s> instead of <del>. Both tags produce the same visual effect — a horizontal line through the text — but <del> carries stronger semantic meaning for screen readers and search engines. The <s> tag indicates text that is no longer accurate, while <del> indicates text that was removed.

If you need to convert your Markdown files to clean HTML, our Markdown to HTML tool preserves the <del> tag output for strikethrough content. For documents that mix strikethrough with tables or diagrams, the Mermaid viewer handles the diagram portions while the HTML converter processes the rest.

Custom styling

You can override the default strikethrough appearance with CSS:

del {
  text-decoration: line-through;
  text-decoration-color: red;
  text-decoration-thickness: 2px;
}

This is useful when building documentation sites or blogs where you want strikethrough text to stand out more clearly — for example, showing price reductions or deprecated API endpoints.

How Do You Preview Markdown Strikethrough on Mac?

macOS has no built-in Markdown renderer that handles GFM extensions like strikethrough — Apple's TextEdit displays ~~text~~ as raw characters with no formatting applied. You need a third-party tool that supports GFM. Here are three options, from free to purpose-built.

VS Code — Open the .md file and press Cmd+Shift+V to open the Markdown preview panel. VS Code uses a GFM-compatible renderer that displays strikethrough correctly. For a side-by-side view, use Cmd+K V.

MacMD Viewer — A native macOS app built specifically for rendering Markdown files. It handles strikethrough, syntax highlighting, Mermaid diagrams, table formatting, and all GFM extensions in a lightweight 2 MB package. Double-click any .md file to see it rendered instantly. Download MacMD Viewer ($19.99, one-time purchase).

Terminal with Glow — Install Glow via Homebrew (brew install glow) and run glow file.md. Glow renders strikethrough with ANSI escape codes directly in the terminal, though the visual effect is less polished than a graphical viewer.

Frequently Asked Questions

How do I strikethrough text in Markdown?

Wrap the text in double tildes: ~~your text~~. This renders as crossed-out text on GitHub, GitLab, VS Code, Obsidian, Reddit, and most GFM-compatible renderers. Do not add spaces between the tildes and your text — spaces break the syntax silently. The HTML output is a <del> tag.

Is Markdown strikethrough part of the official specification?

No. Strikethrough is a GFM extension, not part of the CommonMark specification. GitHub formalized the syntax in section 6.5 of the GFM spec as part of their superset of CommonMark. Most modern Markdown tools support it, but strict CommonMark-only parsers render the tildes as literal characters.

Should I use single or double tildes for strikethrough?

Always use double tildes (~~text~~). The GFM spec allows both single and double, but GitLab, VS Code, Reddit, Stack Overflow, and Typora only support double tildes. Single tildes work on GitHub and Obsidian but fail silently on other platforms. Double tildes are universally supported.

Can I combine strikethrough with bold or italic in Markdown?

Yes. Place the strikethrough tildes on the outside: ~~**bold and struck**~~ or ~~*italic and struck*~~. You can also nest all three: ~~***bold, italic, and struck***~~. The outermost formatting markers are parsed first, so strikethrough tildes should wrap the emphasis markers.

What HTML tag does Markdown strikethrough produce?

Most GFM-compatible parsers convert ~~text~~ to <del>text</del>. The <del> element semantically indicates deleted text per the HTML specification. Some parsers like Pandoc may output <s> instead, which is visually identical but carries slightly different semantic meaning — <s> indicates text that is no longer accurate rather than text that was removed.

Ready to read the markdown your agents write?

Native macOS viewer with Mermaid diagrams, syntax highlighting, and QuickLook. One-time purchase, no subscription.

Buy for $19.99

Continue reading with AI

Summarize in ChatGPT🔍Research in PerplexityAsk Google AI

Content licensed under CC BY 4.0. Cite with attribution to MacMD Viewer.

Related Articles

Tutorial

Markdown Underline: 4 Working Methods Explained (2026)

Markdown underline has no native syntax (CommonMark 0.31.2, 2024). Use HTML <ins>, <u>, or platform tricks — complete method comparison with examples.

Tutorial

Markdown Text Formatting: Every Syntax Option (2026)

Markdown text formatting covers bold, italic, headings, lists, links, and code using plain-text syntax (CommonMark 0.31.2, 2024). Full guide with examples.

Tutorial

Markdown Cheat Sheet: Complete Syntax Reference (2026)

Markdown cheat sheet with every syntax element — headings, bold, tables, code blocks, and links (CommonMark 0.31.2). Copy-paste examples. Bookmark this reference.