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.

Unicode textPaste anywhere: chats, social posts, bios, spreadsheets, file names.
H₂O, CO₂ and Ca(OH)₂, or x₁ + x₂
HTML tagsGitHub and GitLab Markdown, most Markdown editors, any web page.
H<sub>2</sub>O, CO<sub>2</sub> and Ca(OH)<sub>2</sub>, or x<sub>1</sub> + x<sub>2</sub>
Pandoc MarkdownPandoc, R Markdown, Quarto, and Typora with the option turned on.
H~2~O, CO~2~ and Ca(OH)~2~, or x~1~ + x~2~
LaTeX mathGitHub math, Obsidian, Jupyter, Notion equations, anything with MathJax or KaTeX.
$H_{2}\text{O, CO}_{2}\text{ and Ca(OH)}_{2}\text{, or x}_{1} + x_{2}$
Every subscript character in Unicode (32), click to copy

How the input works

You typeYou getRule
H2SO4H₂SO₄Chemical formula mode: digits after a letter or a closing bracket are lowered.
Ca(OH)2Ca(OH)₂Same rule, after ).
x_1, a_nx₁, 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 inCopyLooks like
A chat, social post, spreadsheet cell, slide titleUnicode textH₂O
GitHub or GitLab (README, issues, comments)HTML tags: H<sub>2</sub>OH2O
Pandoc, R Markdown, QuartoPandoc Markdown: H~2~OH2O
TyporaH~2~O after turning on subscript in Preferences, Markdown tabH2O
Math in GitHub, GitLab, Obsidian, Jupyter, NotionLaTeX: $x_{1}$rendered as math
Word, Google DocsNothing: 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