Understanding the subscript generator — concept and principle
Subscripts appear below the line in chemical formulas (H₂O, CO₂) and indexed variables (x₁, aₙ). This generator writes them with Unicode subscript characters, so they survive in plain text. Its chemical-formula mode lowers only the atom counts and keeps coefficients full size, and an underscore mode lowers whatever follows "_".
How it is calculated
Unicode subscripts: digits ₀–₉ (U+2080–U+2089), signs ₊ ₋ ₌ ₍ ₎ and 17 letters (a, e, h, i, j, k, l, m, n, o, p, r, s, t, u, v, x); no capitals
Chemical mode: a digit is lowered only after a letter, a closing bracket or another lowered digit
Underscore mode: "_" is removed and the next number, letter, bracketed group or braced group is lowered
Everything mode: every character with a subscript form is lowered
Characters without a subscript form are counted.
The principle
In chemistry, numbers after an element symbol count atoms and are written as subscripts, while a number in front of a formula is a coefficient that counts molecules and stays full size. That is why "6O2" becomes 6O₂, not ₆O₂. The rule used here follows that convention: a digit is lowered only if it follows something that can carry a count. Unicode includes subscript digits and a limited set of subscript letters, mainly for phonetics, so only those can be lowered.
Worked example
Default inputs: "C6H12O6 + 6O2 → 6CO2 + 6H2O", chemical-formula mode.
- C6 → C₆, H12 → H₁₂, O6 → O₆ (glucose).
- 6O2 → 6O₂; the leading 6 is a coefficient and stays.
- 6CO2 → 6CO₂ and 6H2O → 6H₂O.
- Result: C₆H₁₂O₆ + 6O₂ → 6CO₂ + 6H₂O; characters lowered = 7; letters or digits without a form = 0.
- UTF-16 length = 27.
How to read the result
Chemical mode is ideal for formulas and reaction equations, which follow IUPAC conventions for atom counts. Underscore mode suits maths and variables like x_1 or T_(max). Check charges and states separately: ion charges are usually written as superscripts.
Common mistakes
- Lowering coefficients in front of formulas.
- Expecting capital subscript letters; Unicode has none.
- Writing ion charges as subscripts instead of superscripts.
- Using Unicode subscripts in documents where real formatting is available and better.
Frequently asked questions
How do I write H₂O in plain text?
Use the subscript ₂ (U+2082), which this tool inserts in chemical mode.
Why isn't the 6 in 6CO₂ lowered?
It is a coefficient counting molecules, which is written full size.
Are there subscript capital letters?
No. Unicode has subscript forms for only 17 small letters.
How do I lower a group like "max"?
Use underscore mode with braces or brackets: T_{max} or T_(max).
Sources: The Unicode Standard 15.1, Superscripts and Subscripts block (U+2080–U+209C) and Phonetic Extensions (subscript letters) · IUPAC, Nomenclature of Inorganic Chemistry (Red Book, 2005), IR-4 (formulae)