Understanding the underline text generator — concept and principle
Social media posts, chat messages and file names usually cannot use real underline formatting. This generator imitates underlining by adding a combining mark below every character, in four styles: single line, double line, short line under each letter and dotted.
How it is calculated
After each character (except line breaks, and optionally spaces), add one combining mark:
- Single underline: U+0332 COMBINING LOW LINE
- Double underline: U+0333 COMBINING DOUBLE LOW LINE
- Short underline: U+0331 COMBINING MACRON BELOW (leaves small gaps)
- Dotted: U+0324 COMBINING DIAERESIS BELOW
UTF-16 length = original length + number of marks
The principle
A combining mark has no width and is drawn relative to the character before it. These marks belong to the "below" combining class, so they sit under the baseline. When every character carries a low line, the lines meet and look like one continuous underline in many fonts. The macron below is shorter than the character width, which leaves small gaps, and the diaeresis below draws two dots. Marking spaces too keeps the line continuous across words.
Worked example
Default inputs: "Read this first", spaces marked too.
- The text has 15 characters, including two spaces.
- Single underline: R̲e̲a̲d̲ ̲t̲h̲i̲s̲ ̲f̲i̲r̲s̲t̲.
- Double underline: R̳e̳a̳d̳ ̳t̳h̳i̳s̳ ̳f̳i̳r̳s̳t̳; short and dotted styles follow the same pattern.
- Characters marked = 15.
- UTF-16 length = 15 + 15 = 30.
How to read the result
The appearance depends on the font: some join the lines neatly, others leave gaps or draw them at different heights, especially under letters with descenders like g or p. Because each mark counts as a character, underlined text uses twice the characters. On the web, underlines usually suggest links, so use them sparingly.
Common mistakes
- Expecting identical results on every device.
- Pasting into fields with tight character limits.
- Using underlined text where readers may mistake it for a link.
- Relying on underlining to convey essential meaning to screen reader users.
Frequently asked questions
Why is my underline broken between letters?
The font draws each mark separately; some fonts leave gaps.
Why does the text count as twice as long?
Every character carries an extra combining mark.
Can I underline Korean text?
Yes, the marks can follow Hangul, but the look varies by font.
What is the difference between the single and short underline?
The short style uses a macron below, which is narrower and leaves gaps.
Sources: The Unicode Standard 15.1, §7.9 "Combining Marks" and the Combining Diacritical Marks block: U+0324, U+0331, U+0332, U+0333 (canonical combining class 220, below)