Markdown Strikethrough
What Is Markdown Strikethrough
Strikethrough puts a horizontal line through the middle of text, signaling that the content is "deprecated" or "no longer valid." You'll use it all the time when editing documents, writing READMEs, or taking notes — marking old prices, flagging completed tasks, or correcting mistakes.
Strikethrough isn't part of the original Markdown spec (the one John Gruber designed in 2004). It was added later by GitHub Flavored Markdown (GFM) using two tildes ~~. Because GFM's influence is so massive, almost every Markdown editor and platform now supports this syntax.
Basic Syntax: Wrapping Text with ~~
The syntax is straightforward — put two tildes before and after the text you want to cross out:
~~This text will have a strikethrough~~Rendered result: This text will have a strikethrough
You can apply it to a single word, a sentence, or even a full paragraph:
Was ~~$999~~, now only $499!
~~This proposal was rejected. Don't reference it.~~ See the new plan below.
Meeting time ~~Tuesday 3pm~~ changed to Wednesday 10am.A few things to watch out for:
- Don't add spaces between the tildes and text.
~~ text ~~may fail in some parsers and render as plain text. - A single tilde
~is for subscript, not strikethrough. You need two. - Strikethrough can span multiple lines, but keeping it on one line gives you the best compatibility.
HTML Alternatives
If your editor or platform doesn't support ~~ (rare these days, but it happens), HTML tags work as a fallback:
<del>This text also has a strikethrough</del>
<s>This works too</s>
<strike>This is the oldest way, but still works in many places</strike>All three look similar visually, but they carry different semantic meanings:
| Tag | Meaning | Best for |
|---|---|---|
<del> | "Content that has been removed" | Document revisions, price changes |
<s> | "Content that is no longer accurate or relevant" | Marking outdated info |
<strike> | Deprecated in HTML5, purely visual | Not recommended |
In practice, the distinction between <del> and <s> won't matter for most people. But if you care about semantics (for SEO or screen readers), <del> is the more correct choice. It even supports a datetime attribute to mark when the deletion happened:
<del datetime="2026-05-01">Old version description</del>CSS text-decoration: line-through can achieve the same visual effect too, but that requires control over page styles — not something you'd typically use in a plain Markdown file.
Cross-Platform Compatibility
This is where people run into trouble. While ~~ is the de facto standard, support varies across platforms. I tested it on several common ones and put together a comparison:
| Platform/Editor | ~~ Syntax | <del> Tag | Notes |
|---|---|---|---|
| GitHub (README, Issues, PRs) | ✅ | ✅ | Native GFM support |
| GitLab | ✅ | ✅ | GitLab Flavored Markdown |
| Discord | ✅ | ❌ | Only ~~ works |
| Typora | ✅ | ✅ | Best live preview support |
| VS Code (built-in preview) | ✅ | ✅ | Requires GFM parsing enabled |
| Obsidian | ✅ | ✅ | |
| JianShu | ✅ | ⚠️ | ~~ works fine, HTML tags may get filtered |
| CSDN | ✅ | ⚠️ | Similar to JianShu, HTML tags sometimes don't render |
| Stack Exchange Q&A | ❌ | ✅ | Use HTML in Q&A, ---text--- in chat |
| ✅ | ❌ | Supported since 2023 | |
| Slack | ❌ | ❌ | No strikethrough support |
| Feishu Docs | ✅ | ✅ |
I once spent way too long troubleshooting why ~~ wasn't rendering in an older static site generator, only to discover it was using a CommonMark parser without GFM extensions. Switching to <del> fixed it immediately.
Nested Formatting: Strikethrough + Bold / Italic
Strikethrough combines well with other Markdown formatting. This comes up more often than you'd think.
Strikethrough + Bold:
**~~Important but outdated info~~**
~~**Important but outdated info**~~Both produce the same result: Bold strikethrough text
Strikethrough + Italic:
*~~Italic strikethrough~~*
~~*Italic strikethrough*~~Result: ~~Italic strikethrough~
Strikethrough + Bold + Italic:
***~~All formatting combined~~***
~~***All formatting combined***~~Result: ~~All formatting combined~
When nesting formats, make sure the symbols pair up correctly. ~~**text**~~ and **~~text~~** both work, but ~~**text~~** (crossed nesting) will break the rendering.
Practical Use Cases
Now that you know the syntax, here are some scenarios where strikethrough really shines.
Price comparisons — common on e-commerce and SaaS landing pages:
| Plan | Original | Sale Price |
|------|----------|------------|
| Basic | ~~$99/mo~~ | $49/mo |
| Pro | ~~$199/mo~~ | $99/mo |Document revisions — marking what changed:
The `max_connections` default is ~~100~~ 200 (changed in v2.0).TODO management — marking tasks done while keeping the record:
- ~~Complete requirements analysis~~
- ~~Write technical proposal~~
- Build core features
- Test and deployThis style works great in GitHub Issues and Obsidian notes — better than checkboxes when you want to keep a visible record of what's done.
Correction annotations — fixing wrong information in discussions:
The Earth is ~~flat~~ spherical.FAQ
Why isn't my strikethrough working?
Three most common causes:
- Only one tilde. Strikethrough uses
~~(two tildes), not~(one). - Spaces inside the tildes.
~~ text ~~doesn't work in some parsers. - Your editor doesn't support GFM extensions. Try using
<del>instead.
Can I use strikethrough inside code blocks?
Not directly. Markdown formatting (including strikethrough) doesn't work inside code blocks (` or ```). This is by design.
If you need to show "deleted code," use a diff syntax block instead:
```diff
- Old code line (shown in red)
+ New code line (shown in green)
This is very common on GitHub. It's not a visual strikethrough, but semantically it's more accurate — clearly showing what was removed and what was added.
### What's the difference between strikethrough and highlight?
Strikethrough (`~~text~~`) draws a line through text to indicate "deprecated." Highlight (`==text==`) applies a background color to mark text as "important." They serve completely different purposes — don't mix them up.
### Does strikethrough work in Markdown tables?
Yes. Just use `~~` normally inside table cells:
```markdown
| Feature | Status |
|---------|--------|
| ~~User Registration~~ | Migrated to new system |
| Data Export | Active |A few Markdown parsers don't handle ~~ well inside tables. If you run into this, fall back to <del>.
Quick Reference
| Syntax | Result | Notes |
|---|---|---|
~~text~~ | GFM standard | |
<del>text</del> | Semantic HTML | |
<s>text</s> | For inaccurate info | |
~~**text**~~ | Strikethrough + Bold |
The syntax itself is just a couple of characters, but the gotchas are all in platform compatibility. Two rules of thumb: don't add spaces inside ~~, and if it doesn't work, switch to <del>. That covers virtually every scenario.
References
- GitHub Flavored Markdown Spec — Strikethrough: Official GFM specification for the strikethrough extension
- GitHub Docs — Basic Writing and Formatting Syntax: GitHub's official documentation on strikethrough syntax
- Markdown Guide — Extended Syntax: Introduction to strikethrough as an extended syntax feature
- CommonMark Spec: CommonMark specification (showing base Markdown doesn't include strikethrough)
- Wikipedia — Strikethrough: Historical background, HTML tag evolution, and Unicode implementation