Skip to content

Free · Private · No sign-up

Markdown horizontal line — copy a rule that actually renders

One click to copy ---, *** or ___, plus the three rules that decide whether your horizontal rule renders or turns into a heading, a list or bold text.

Dash remover tool

Everything happens in your browser. Your text never leaves this page.

Dashes to remove
Replace each dash with
Cleanup options

Press Ctrl (or ⌘) + Enter to run it again.

Cleaned text

0dashes removed

The horizontal rule — HTML’s <hr>, the “thematic break” of the CommonMark spec — is markdown at its most minimal: three characters on a line by themselves. It is also markdown at its most treacherous, because the three spellings behave differently in the wrong company. --- directly under a line of text is not a rule at all: it promotes that text to an H2 heading. *** in the wrong parser can read as emphasis. And a rule inside a list item is not a rule — it is list text.

The three forms above are what the spec calls equivalent: --- (hyphens), *** (asterisks) and ___ (underscores), each on its own line, each with a blank line above and below. Copy whichever suits your document. If you paste rules under paragraphs regularly, the asterisk form is the habit worth forming — it cannot be misread as a setext heading by any markdown engine, however the document above it ends.

Every variant is a real text string, not an image: paste it into a README, a Jekyll post, a Discord message or a static-site generator and it renders as the same rule everywhere markdown is spoken. The cards below cover the three syntax rules that decide whether it works, because “how to make a horizontal line in markdown” is really three questions: which characters, how many, and what must surround them.

The three horizontal rules

Same output, different failure modes. Click a card to copy its markup.

The three rules that make it render

Three or more characters

Exactly --- works, and so does ----------. Anything fewer is just text. The common convention is three.

A blank line above

Text, then ---, makes the text a heading and the rule disappears. Always leave an empty line between the paragraph and the rule.

Nothing but the characters

Spaces between the marks are allowed ( - - - ), but any other text on the line — including a list item — changes what it means.

You writeYou get
Text\n---An H2 heading — not a rule.
Text\n\n---The intended horizontal rule.
- item\n---A heading — the list marker changes the meaning.
- item\n\n---The intended horizontal rule.
- - -A rule — spaces between the marks are allowed.
--Plain text: two hyphens are not enough.

The same hyphen that builds markdown rules is the character this site removes: if a draft arrived full of --- separators you did not want, theremove-all-dashes tooltakes the family out, and themarkdown horizontal line referenceis always here when you need one back.

Questions

How do I make a horizontal line in markdown?
Put three or more hyphens (---), asterisks (***) or underscores (___) on a line by themselves, with a blank line above and below. All three render as the same horizontal rule — the HTML <hr> element.
Why does my --- turn the line above into a heading?
Because a line of text followed immediately by --- is setext syntax for an H2 heading, not a rule. That is the single most common markdown surprise. Leave a blank line between the text and the hyphens — or use *** instead, which cannot be misread.
Is <hr> valid markdown?
Yes — raw HTML is allowed in markdown and <hr> (or <hr />) renders as a rule in every major engine. It is the escape hatch when the native syntax misbehaves, but the three-character forms are more portable and survive round-trips through editors better.
What is the difference between --- and ***?
In output, nothing — both become the same <hr>. In behaviour, one thing: --- under a paragraph makes that paragraph a heading, while *** always renders as a rule. That asymmetry is why style guides that care pick one and document it.
How many characters does a rule need?
Three or more — ---------- is as valid as ---. Spacing between the characters is allowed ( - - - renders), but anything else on the line (text, a list marker) changes the meaning entirely.
Can I style the horizontal line?
Not with markdown itself. The rule becomes an <hr> in HTML, so CSS is the tool: hr { border: 0; border-top: 1px solid #ccc; } is the classic restyle. In platforms you do not control, the rule renders however their stylesheet decides.

Ready to clean your text?

No sign-up, no upload, no word limit. Paste, pick, and copy the result.

Remove dashes now

Related dash tools

The hyphen wears many hats. The rest of its wardrobe lives here.