Subscript Generator
Type a formula like H2SO4 or x_1 + x_2 and copy it as subscript text you can paste anywhere (H₂SO₄, x₁ + x₂), or as the HTML, Markdown or LaTeX that renders a real subscript.
Every subscript character in Unicode (32), click to copy
How the input works
| You type | You get | Rule |
|---|---|---|
H2SO4 | H₂SO₄ | Chemical formula mode: digits after a letter or a closing bracket are lowered. |
Ca(OH)2 | Ca(OH)₂ | Same rule, after ). |
x_1, a_n | x₁, aₙ | _ lowers the letters or digits that follow it. |
x_{i+1} | xᵢ₊₁ | Braces lower everything inside them. |
SO4^{2-} | SO₄²⁻ | ^ raises, so ion charges work too. |
Turn off chemical formula mode if your text has numbers that should stay on the line, such as "Room 101B".
Which output should you copy?
| You are writing in | Copy | Looks like |
|---|---|---|
| A chat, social post, spreadsheet cell, slide title | Unicode text | H₂O |
| GitHub or GitLab (README, issues, comments) | HTML tags: H<sub>2</sub>O | H2O |
| Pandoc, R Markdown, Quarto | Pandoc Markdown: H~2~O | H2O |
| Typora | H~2~O after turning on subscript in Preferences, Markdown tab | H2O |
| Math in GitHub, GitLab, Obsidian, Jupyter, Notion | LaTeX: $x_{1}$ | rendered as math |
| Word, Google Docs | Nothing: Word Ctrl + Shift + Minus, Google Docs Ctrl + , (⌘ + , on Mac) | H2O |
Watch the tilde: in Pandoc a single pair ~2~ is subscript, but on GitHub and many other renderers ~text~ or ~~text~~ is strikethrough. That is why the HTML tags are the safe choice for anything that will be read on GitHub. Details per platform are in subscript and superscript in Markdown.
The subscript gap in Unicode
Unicode subscripts are a short list: the digits ₀ to ₉, the signs ₊ ₋ ₌ ₍ ₎, and 17 lowercase letters (ₐ ₑ ₕ ᵢ ⱼ ₖ ₗ ₘ ₙ ₒ ₚ ᵣ ₛ ₜ ᵤ ᵥ ₓ). There are no subscript capitals and no subscript b, c, d, f, g, q, w, y or z. Chemical formulas only need digits, so H₂O, CO₂, C₆H₁₂O₆ and NH₄⁺ all work. Labels like vfinal (no subscript f) or Tc do not, and the generator names the characters it could not lower. Use the HTML or LaTeX output for those.
Questions
How do I write CO₂ in a text message or on social media?
Type CO2 with chemical formula mode on and copy the Unicode output. The ₂ is a normal character (U+2082), so it pastes anywhere that accepts text.
Why does my subscript text look uneven?
Subscript digits and letters come from different parts of Unicode, and many fonts draw them at slightly different sizes or heights. The look depends on the font where you paste, not on the generator.
Is Unicode subscript OK in a scientific paper?
No. Journals and word processors expect real subscript formatting or LaTeX, which keeps the text searchable and accessible. Use Unicode subscripts where real formatting is not available.
How all of the copy and paste text styles work, and what they cost in length, search and accessibility: text styles explained.
Related tools
- Superscript Generator: x², 10⁻³, 1ˢᵗ.
- Small Text Generator: small caps, superscript and subscript words.
- Markdown Math Editor: LaTeX formulas with live preview.