Horizontal Line Unicode Characters
A practical guide to horizontal line Unicode characters: dashes, bars, box-drawing lines and combining strokes, how to identify them, and when plain text is safer.
Unicode has no single line character. It has dozens of characters that render as a horizontal stroke, and each has its own code point, name and intended job. They include hyphens, dashes, minus signs, underscores, overlines, box-drawing segments and combining marks that draw a line through or under other letters. Two of them can look identical on screen and still behave differently in code, search, sorting and screen readers. This review explains what changes when you use one of these characters, how to tell which one you have, and when an ordinary hyphen or a styled separator is the better choice.
Is a horizontal line character right for your use?
A specific line character is worth using when the text needs to carry a particular meaning or shape. Examples include an en dash in a number range, an em dash in prose, a true minus sign in typeset math, or box-drawing lines in a monospaced diagram. The main benefit is precision: the character still means the right thing after it is copied, because the meaning is stored in the text rather than added by styling. The main tradeoff is that lookalike characters are not interchangeable. A dash typed where a hyphen-minus is expected can break a command, a search or a parser, and nothing on screen shows why.
- Plain hyphen-minus (U+002D) or another ordinary character is usually preferable when:
- The text is code, a command-line flag, a filename, a URL path, an email subject line or anything a program parses.
- People need to find the text by typing a search term on a standard keyboard.
- The line is only decoration on a web page or document. An HTML horizontal rule or a CSS border is a better fit there than a row of characters.
- The audience relies on screen readers and the line carries no meaning of its own.
- The destination font or platform is unknown and the line must look right, which matters most for box-drawing characters.
Common horizontal line characters
| Character | Code point | Unicode name | Typical use |
| • | U+002D | HYPHEN-MINUS | Keyboard hyphen; required in most code and commands |
| ‐ | U+2010 | HYPHEN | Typographic hyphen in prose |
| ‑ | U+2011 | NON-BREAKING HYPHEN | Hyphen that prevents a line break |
| ‒ | U+2012 | FIGURE DASH | Dash matching digit width, as in phone numbers |
| – | U+2013 | EN DASH | Ranges such as 10–20 |
| — | U+2014 | EM DASH | Breaks and asides in prose |
| ― | U+2015 | HORIZONTAL BAR | Introducing quoted dialogue in some styles |
| ⸺ | U+2E3A | TWO-EM DASH | Omitted letters or words |
| ⸻ | U+2E3B | THREE-EM DASH | Repeated author names in bibliographies |
| − | U+2212 | MINUS SIGN | Mathematical subtraction and negative values |
| _ | U+005F | LOW LINE | Underscore; identifiers and placeholders |
| ‾ | U+203E | OVERLINE | Line at the top of the character cell |
| ¯ | U+00AF | MACRON | Spacing macron; often used as a high bar |
| ⎯ | U+23AF | HORIZONTAL LINE EXTENSION | Building long horizontal brackets or lines |
| ─ | U+2500 | BOX DRAWINGS LIGHT HORIZONTAL | Thin lines in text diagrams and tables |
| ━ | U+2501 | BOX DRAWINGS HEAVY HORIZONTAL | Thick lines in text diagrams |
| ═ | U+2550 | BOX DRAWINGS DOUBLE HORIZONTAL | Double lines in text diagrams |
| ┄ | U+2504 | BOX DRAWINGS LIGHT TRIPLE DASH HORIZONTAL | Dashed lines in text diagrams |
| ➖ | U+2796 | HEAVY MINUS SIGN | Emoji-style minus symbol |
| - | U+FF0D | FULLWIDTH HYPHEN-MINUS | Hyphen sized for East Asian text layout |
Some characters outside these groups also look like a horizontal stroke. Two examples are the katakana-hiragana prolonged sound mark (U+30FC) and the CJK ideograph for "one" (U+4E00). These are letters or ideographs with linguistic meaning, not punctuation or line art. Using them as a decorative line can confuse readers of those scripts and produce misleading search results.
What using these characters actually changes
Choosing one line character over another is a substitution at the level of stored text: the document holds a different code point. That differs from visual presentation, where the stored text stays the same and only its display changes. Examples of presentation include a CSS border, an HTML horizontal rule element, or a Markdown renderer turning three hyphens into a rule. A stored character travels with copied text. A presentational line usually disappears when the text is copied as plain text, or turns back into its source characters.
Tools sold as "line text," "strikethrough font" or "underline font" generators usually do not change a font. Most insert combining characters after each letter. COMBINING LONG STROKE OVERLAY (U+0336) draws a line through the preceding character, and COMBINING LOW LINE (U+0332) draws one beneath it. The result looks styled, but the stored string is roughly twice as long and contains code points that a search box or spell checker does not expect.
Displayed: a̶b̶
Stored: U+0061 U+0336 U+0062 U+0336
a stroke b stroke
This matters for reverse and mirror tools. Reversing that string one code point at a time gives U+0336, U+0062, U+0336, U+0061. The first stroke now has no base letter, and the strokes attach to different letters than before. A reversal tool that respects grapheme clusters keeps each letter with its mark. One that reverses raw code points does not, so check the output of any tool you are evaluating with a sample like this one. The standalone line characters in the table are mostly symmetrical, so a mirrored-glyph effect rarely changes how they look. In bidirectional text they have no strong direction of their own. Their position therefore depends on the surrounding right-to-left or left-to-right text, which can move a dash to an unexpected side of a word in mixed-direction content.
Identifying which line character you have
Because lookalikes are common, the reliable way to identify a line character is to read its code point, not to judge by its appearance. Dedicated Unicode inspector tools show the code point and name for each character you paste in. If you have a programming environment, a few lines of code do the same job and also reveal hidden combining marks.
import unicodedata
for ch in "a-b–c—d─e":
print(f"U+{ord(ch):04X}", unicodedata.name(ch, "<unnamed>"))
[..."-–—−─"].map(c =>
"U+" + c.codePointAt(0).toString(16).toUpperCase().padStart(4, "0")
);
Copying, sharing and accessibility
Copying plain text normally keeps the exact code points, but other steps can change them. Word processors and some messaging apps may turn typed double hyphens into dashes through autocorrect. Some systems apply Unicode compatibility normalization (NFKC), which converts characters such as FULLWIDTH HYPHEN-MINUS (U+FF0D) to an ordinary hyphen-minus. Whether a given destination does either of these is platform-specific. If the exact character matters, paste the text into an inspector after it reaches its destination and confirm what arrived.
Search and editing are where lookalikes cause the most practical trouble. A search for a phrase typed with a keyboard hyphen may not match text that contains an en dash or a non-breaking hyphen, unless the search system treats them as equivalent. Text with combining strokes or underlines may not match its unstyled form at all. Pasted code that contains a dash or a minus sign instead of U+002D is a common cause of errors, because most programming languages and shells accept only the hyphen-minus as an operator or flag prefix.
Screen readers may announce a line character by its name, by a short description, or not at all. The result depends on the screen reader, its punctuation verbosity setting and the voice in use, so no single result can be assumed. A row of box-drawing characters used as a divider may be read out character by character or silently skipped. Text with a combining character after each letter may be read with interruptions or in ways that hide the intended meaning. When a line is purely visual, an HTML horizontal rule is the safer choice: HTML and ARIA define it as a separator, so assistive technology can convey it as one. When struck-through or underlined text carries meaning, such as a deleted price, put that meaning in plain words alongside it.
Rendering depends on fonts. Box-drawing characters join into continuous lines only in fonts that design them to fill the full character cell, which usually means monospaced fonts in terminals and code blocks. In proportional fonts the segments may show gaps or misalign. Less common characters such as the two-em and three-em dashes, or the horizontal line extension, may be missing from some fonts. In that case the platform substitutes another font or shows a placeholder box.
Limits of this review
This review relies on general Unicode character properties and documented web standards. It includes no tests of specific apps, social platforms, browsers or screen readers. Claims about how a particular destination handles autocorrect, normalization, search matching or speech output are therefore not made here. If your use depends on one of those behaviors, test a sample in the exact destination and with the assistive technology your readers use. A good result in one environment does not show the same result in others.