Understanding the strikethrough text generator — concept and principle
Strikethrough text shows something crossed out, like an old price or a joke correction. Where real formatting is not available, this generator imitates it by adding a combining overlay mark after every character, with four styles: long stroke, short stroke, slash and wavy line.
How it is calculated
After each character (except line breaks, and optionally spaces), add one combining mark:
- Long stroke: U+0336 COMBINING LONG STROKE OVERLAY
- Short stroke: U+0335 COMBINING SHORT STROKE OVERLAY
- Slash: U+0338 COMBINING LONG SOLIDUS OVERLAY
- Wavy: U+0334 COMBINING TILDE OVERLAY
UTF-16 length = original length + number of marks
The principle
A combining mark has no width of its own and is drawn on top of the character before it. Overlay marks (combining class 1) are drawn through the middle of the character rather than above or below. Adding a long stroke after every character makes the strokes join into what looks like a continuous line. Marking the spaces too keeps the line unbroken between words; leaving them plain shows gaps. Fonts differ in how they draw these marks, so the line may look slightly uneven.
Worked example
Default inputs: "Price 30,000 won", spaces marked too.
- The text has 16 characters including the two spaces.
- A long stroke mark is added after each: P̶r̶i̶c̶e̶ ̶3̶0̶,̶0̶0̶0̶ ̶w̶o̶n̶.
- Other styles: short P̵r̵i̵c̵e̵ ̵3̵0̵,̵0̵0̵0̵ ̵w̵o̵n̵, slash and wavy similarly.
- Characters marked = 16.
- UTF-16 length = 16 + 16 = 32.
How to read the result
Use strikethrough for showing corrections, discounts or humour. Because every mark counts as a character, the text uses twice as many characters, which matters on platforms with limits. Some screen readers read each mark or ignore the meaning of crossed-out text, so do not rely on strikethrough alone to convey information.
Common mistakes
- Pasting into fields with tight character limits.
- Expecting identical rendering on all devices and fonts.
- Using crossed-out text to communicate essential meaning.
Frequently asked questions
Why does my strikethrough text count double?
Each character is followed by an invisible-width mark that also counts.
Why does the line look broken in some apps?
The font draws each mark separately, and some fonts leave gaps.
Should I mark the spaces?
Mark them for a continuous line; leave them plain to separate words.
Does it work with Korean?
Yes, the marks can follow any character, though the look depends on the font.
Sources: The Unicode Standard 15.1, §7.9 "Combining Marks" and the Combining Diacritical Marks block: U+0334, U+0335, U+0336, U+0338 (canonical combining class 1, overlay)