Zalgo Text Generator
Generate glitchy Zalgo text with combining characters.Runs in this tab.⌘ ↵ runs it
Next step
Turn a click-through into an interactive demo
AtriumKit records your web app once in Chrome and turns every click into a step of a demo you can embed or share. There’s a free plan.
Try AtriumKit freeAbout Zalgo Text Generator
How combining marks stack
A combining mark is a code point with no width of its own. The renderer draws it on top of, below or through the character before it. That’s how é can be stored as two code points, e followed by U+0301 COMBINING ACUTE ACCENT. Unicode sets no limit on how many marks can follow one base character, so e plus twenty marks is valid text, and the renderer stacks them up and down from the letter. That’s all Zalgo text is.
What this generator adds
Every mark comes from the Combining Diacritical Marks block (U+0300 to U+036F), sorted into three pools:
| Pool | Marks | What’s in it |
|---|---|---|
| Up | 48 | Accents, tildes, carons, breves, and the tiny superscript letters U+0363 to U+036F (a, e, i, o, u, c, d, h, m, r, t, v, x) |
| Middle | 19 | Strokes through the letter (U+0334 to U+0336), hooks, cedilla, ogonek, and double marks such as U+035C that reach over the next letter |
| Down | 40 | Dots, rings, lines, arrows and bridges below |
The middle pool also includes U+034F COMBINING GRAPHEME JOINER, which is invisible, so some middle picks add nothing you can see.
For every character, the generator appends a random number of marks from each ticked pool, in the order up, middle, down. Each count is drawn once per character and direction. Up and down counts are spread evenly across their range, and the middle count is a draw from the same range halved and rounded up. Over 200,000 simulated characters per level, the averages came out as:
| Intensity | Up or down (each) | Middle | Average total per character, all three on |
|---|---|---|---|
| Mild | 1–3, average 2 | 1–2, average 1.3 | 5.3 |
| Medium | 2–7, average 4.5 | 1–4, average 2.5 | 11.5 |
| Heavy | 5–16, average 10.5 | 3–8, average 5.5 | 26.5 |
A few other behaviors to know:
- Spaces and line breaks get marks too. Marks on a space float in the gap between words. Marks after a line break have no letter to sit on, so they pile up at the start of the next line.
- Input is read by code point, so an emoji gets its marks after the whole emoji rather than between its two UTF-16 halves.
- The output is rebuilt from scratch whenever you type or change a setting. Copy it once you like it. With all three boxes unticked, the output is your input unchanged.
Length, cursor movement and character limits
A letter and all its marks form one grapheme cluster (Unicode UAX #29). The cursor jumps over the whole stack, and Intl.Segmenter counts it as one character. Anything that counts code points or UTF-16 units counts every mark:
const s = 'h̴̖̀'; // h with three marks
s.length // 4
[...new Intl.Segmenter().segment(s)].length // 1
new TextEncoder().encode(s).length // 7: each of these marks is 2 bytes in UTF-8
At heavy, one letter averages about 27.5 code points (the letter plus 26.5 marks), so a 280-character limit holds about 10 letters. A database column sized in characters fills up the same way. The string length calculator shows characters, UTF-16 units and UTF-8 bytes for any output.
Where it renders differently or changes
- Marks don’t make a line taller. Stacks spill over the lines above and below. A container with
overflow: hidden, which is common for chat bubbles and table cells, cuts them off. - Stacking depends on the font and the platform’s text shaper, so the same string looks different on Windows, macOS and Android.
- Unicode normalization rewrites some of it. Four marks in the pools are deprecated duplicates that NFC and NFD replace: U+0340 becomes U+0300, U+0341 becomes U+0301, U+0343 becomes U+0313, and U+0344 becomes U+0308 U+0301. Normalization also re-sorts each stack by combining class, moving below marks (class 220) ahead of above marks (class 230). The text looks the same, but its code points change, so a hash or exact comparison against your original fails after it passes through a system that normalizes.
To see what an individual mark is, paste it into the Unicode character lookup.
Stripping Zalgo text
To clean Zalgo out of user input or a username:
// Remove every combining mark (this also strips real accents: "café" becomes "cafe")
text.normalize('NFD').replace(/\p{M}/gu, '')
// Keep at most two marks per character, which leaves ordinary accented text alone
text.replace(/(\p{M}{2})\p{M}+/gu, '$1')
import unicodedata
''.join(c for c in unicodedata.normalize('NFD', s) if not unicodedata.category(c).startswith('M'))
In Python, filter on the category, not on unicodedata.combining(c). U+034F has combining class 0, so combining() lets it through.
Questions
What is Zalgo text?
How do I control the intensity of Zalgo text?
Can I paste Zalgo text on social media?
Is Zalgo text accessible to screen readers?
Does the Zalgo text generator work offline?
Comments
More in Text & String Utilities
- Word Counter
- Regex Tester
- String Case Converter
- Slug Generator
- Text Diff
- Lorem Ipsum Generator
- Line Sorter & Deduplicator
- Text Reverse
Comments