Convert styled Unicode letters to plain text
How styled Unicode 'fonts' work, what Unicode normalization turns back into ordinary letters, what it misses, and when plain text is the better choice.
Bold, script, circled or wide lettering pasted from social bios, usernames and 'font generator' sites is usually not a font. Each styled letter is a separate Unicode character that only looks like a Latin letter. Turning those characters back into ordinary letters is often straightforward, but how complete the result is depends on which character families were used. This review explains what conversion changes, where standard tools handle it, where they don't, and how to check the result.
Is converting to plain letters right for your use?
Convert styled text to plain letters whenever it needs to be searched, edited, spell-checked, sorted, stored as data, or read by assistive technology. The main benefit is that conversion restores the same characters a keyboard produces, which is what most software expects. The decisive tradeoff is that you lose the visual styling, and a blanket normalization step can also rewrite characters that were never decoration, such as superscripts, ligatures, fractions and mathematical notation. Plain text is the better default for anything that carries information. Styled characters are defensible only as decoration, ideally with a plain equivalent available nearby.
- Conversion fits well: cleaning names, handles or bios before storing them in a database or CRM
- Conversion fits well: making copied social posts searchable and editable
- Conversion fits well: preparing text for screen readers, translation or text analysis
- Use a targeted approach instead of blanket normalization: text that also contains superscripts, fractions, ligatures, CJK punctuation or accented letters you need to keep
- Keep the original characters: mathematical writing, where bold or italic letters distinguish different quantities
What styled Unicode text actually is
A real font, or CSS styling such as bold weight, changes only how characters are drawn. The stored letter H remains U+0048 whether it is displayed bold, italic or in a different typeface, so copying it elsewhere yields an ordinary H. Styled-text generators work differently: they replace each letter with a different code point. The bold-looking π is U+1D407 MATHEMATICAL BOLD CAPITAL H, a distinct character intended for mathematical notation. The word 'font' in 'font generator' is therefore misleading. Nothing about the typeface changes; the characters themselves do. If your text only looks styled because of CSS or a word processor's formatting, it is already plain text underneath and needs no conversion.
| Character family | Example | Code points | Result of NFKC normalization |
| Mathematical alphanumerics (bold, italic, script, fraktur, double-struck, sans-serif, monospace) | πππ₯π₯π¨ | U+1D407, U+1D41E, U+1D425, U+1D425, U+1D428 | Hello |
| Fullwidth forms | οΌ¨ο½ ο½ο½ο½ | U+FF28, U+FF45, U+FF4C, U+FF4C, U+FF4F | Hello |
| Circled letters (enclosed alphanumerics) | β½ββββ | U+24BD, U+24D4, U+24DB, U+24DB, U+24DE | Hello |
| Superscript and modifier letters | α΄΄α΅Λ‘Λ‘α΅ | U+1D34, U+1D49, U+02E1, U+02E1, U+1D52 | Hello |
| Small capitals | Κα΄ΚΚα΄ | U+029C, U+1D07, U+029F, U+029F, U+1D0F | Unchanged (no decomposition mapping) |
| Upside-down lookalikes | Η, Ι₯ | U+01DD, U+0265 | Unchanged |
| Regional indicator letters | π¦ | U+1F1E6 | Unchanged; adjacent pairs may render as a flag |
The mathematical block has gaps. Some styled letters were encoded earlier in the Letterlike Symbols block, so they sit outside the main range: the italic small h is β (U+210E, PLANCK CONSTANT), and the double-struck capitals β, β, β, β, β, β and β€ are also there. These carry the same kind of decomposition mapping, so normalization handles them. A homemade converter that simply subtracts an offset from the U+1D400 range, however, will miss them or produce wrong letters.
How conversion works
The standard mechanism is Unicode compatibility normalization (NFKC, or NFKD for the decomposed form). The Unicode Character Database gives many styled characters a compatibility decomposition with a tag describing the styling: mathematical letters are tagged as font variants, fullwidth letters as wide, circled letters as circle, and superscript letters as super. Compatibility normalization discards the styling and substitutes the base letter. In Python this is a single call:
import unicodedata
styled = "πππ₯π₯π¨ οΌ·ο½ο½ο½ο½"
plain = unicodedata.normalize("NFKC", styled)
# plain == "Hello World"
JavaScript offers the same operation through the string normalize method with the NFKC form, and most languages expose an equivalent. The output follows from the decomposition mappings in the Unicode data your runtime ships with. Characters added in newer Unicode versions may be missing from an older runtime's tables.
Normalization does not cover small capitals, upside-down letters, regional indicators, or lookalike letters borrowed from other scripts, such as Cyrillic Π° (U+0430) standing in for Latin a. These have no compatibility mapping to Latin letters, so converting them requires an explicit lookup table, and each entry is a judgment call. A Cyrillic letter may be a disguised Latin letter or a genuine part of Russian text, and no table can tell which from the character alone. Unicode publishes confusable-character data intended for comparing strings, such as detecting spoofed usernames. It is not intended for rewriting text that people will read.
What else blanket normalization changes
Applying NFKC to an entire document affects every character with a compatibility mapping, not just the decorative ones. Several of these changes can alter meaning:
- xΒ² becomes x2, which reads as a different expression
- The ligature ο¬ becomes the two letters fi (usually harmless)
- Β½ becomes 1β2, written with a fraction slash rather than a single character
- β’ becomes the letters TM
- A no-break space becomes an ordinary space, which can allow unwanted line breaks
- Fullwidth punctuation in Chinese, Japanese or Korean text becomes ASCII punctuation
- Mathematical bold or italic letters that distinguish different variables collapse into one plain letter
When the text mixes decoration with content like this, convert only the styled letter families and leave everything else alone. The sketch below uses each character's decomposition tag to decide what to convert. It illustrates the approach and has not been tested against your data. To include superscript letters, add their tag to the tuple, keeping in mind that this also converts superscript digits.
import unicodedata
STYLE_TAGS = ("<font>", "<wide>", "<circle>")
def unstyle(text):
out = []
for ch in text:
if unicodedata.decomposition(ch).startswith(STYLE_TAGS):
mapped = unicodedata.normalize("NFKC", ch)
if mapped.isalnum():
out.append(mapped)
continue
out.append(ch)
return "".join(out)
Strikethrough, underline and other overlay styles
Strikethrough and underline 'fonts' work differently from the families above. They keep the ordinary letter and add a combining mark after it: SΜΆ is S followed by U+0336 COMBINING LONG STROKE OVERLAY, and underlining commonly uses U+0332 COMBINING LOW LINE. Normalization leaves these marks in place. Stripping every combining mark is the wrong fix, because it also removes accents (Γ© decomposes to e plus U+0301) and can change symbols. For example, β decomposes canonically to = followed by U+0338, so removing that mark turns 'not equal' into 'equal'. A safer method is to remove only a known list of overlay code points, apply it only where they are decorative, and work on NFC-normalized text, where β is stored as a single precomposed character.
Reversed, mirrored and upside-down text
Text described as reversed or mirrored needs separate handling. Upside-down generators usually substitute lookalike characters and also reverse their order, so restoring the text requires a reverse lookup table and re-reversing the sequence. Normalization does neither. Reversal should operate on grapheme clusters rather than code points; otherwise accents detach from their letters and multi-code-point emoji break apart. Text that only appears mirrored on screen may not be altered at all. A CSS transform leaves the stored characters untouched. A right-to-left override control character (U+202E) stores the characters in their normal order and reverses only how they are displayed. The control character survives copy and paste, so removing it is the fix.
Will the result stay readable and usable?
Converted output uses the same code points as typed text, so it behaves like typed text in editors, search boxes and spellcheckers. That predictability is the main reason to convert. The styled original is the version whose behavior varies from one destination to the next.
Assistive technology: every styled character has its own Unicode name, such as MATHEMATICAL BOLD CAPITAL H. How a screen reader announces these characters depends on the product, version, language and verbosity settings. A reader might announce plain letters, read out character names, or skip characters it does not recognize. No scoped screen reader test was supplied for this review, so no claim is made about any specific product. The practical rule holds regardless: if styled text carries meaning, also provide a plain-text equivalent.
Search and matching: styled letters are distinct code points, so a search for 'hello' does not inherently match π‘ππ₯π₯π¨. Whether a given platform, search engine or database folds the two together depends on its own normalization, which was not documented or tested here. Check in the specific destination, or convert before storing so the question never arises.
Editing, counting and display: find-and-replace, spellchecking and alphabetical sorting treat styled letters as unrelated symbols. Mathematical alphanumerics lie outside the Basic Multilingual Plane, so each one counts as two UTF-16 code units, and character counters that measure UTF-16 length will report styled text as roughly twice its visible length. On devices whose fonts lack the needed glyphs, styled characters may appear as empty boxes. Plain letters avoid all of these problems.
Privacy: pasting text into an online converter hands it to someone else's page. A tool's appearance or marketing language does not reveal whether text is processed locally, sent to a server or retained. Read the tool's stated policy, or convert locally with a few lines of code such as the examples above.
How to check a conversion
- Inspect code points before and after conversion, not just how the text looks on screen
- List any non-ASCII characters left over when the text should be plain English; for other languages, review leftovers by hand instead
- Compare meaning-bearing characters such as superscripts, fractions, accents and β against the original
- Test in the actual destination, including a screen reader if accessibility matters
leftover = sorted({
f"U+{ord(c):04X} {unicodedata.name(c, '?')}"
for c in plain if not c.isascii()
})
What this review could not verify
- No screen reader or other assistive technology was tested with styled or converted text
- No platform, search engine or database was tested for whether it folds styled letters into plain ones
- No specific converter tool was evaluated for accuracy, coverage or data handling
- The code sketches show documented normalization behavior; they were not run against your data
- Results can vary with the Unicode version built into your runtime