Skip to content

Common formulae

Every block on this page is rendered at build time by invoking the asciichem gem. Source on the left; MathML output on the right. If you view the page source, you’ll see the same is what you’d type.

Source Rendered
H_2O CO_2 NaCl CH_4
Install the asciichem gem to see this rendered.
Source Rendered
HCl H_2SO_4 HNO_3 H_3PO_4 NaOH Ca(OH)_2
Install the asciichem gem to see this rendered.
Source Rendered
Na^+ Cl^- SO_4^2- NO_3^- Ca^2+
Install the asciichem gem to see this rendered.
Source Rendered
^14C ^131I ^238U ^3H
Install the asciichem gem to see this rendered.

The prefix isotope binds to the atom. See Atoms for the full story.

Source Rendered
[Fe(CN)_6] [Fe(CN)_6]_3 [PtCl_4]
Install the asciichem gem to see this rendered.
Source Rendered
2H_2O 3H_2 C_6H_12O_6
Install the asciichem gem to see this rendered.
Source Rendered
2H_2 + O_2 -> 2H_2O N_2 + 3H_2 <=>[Fe][400°C] 2NH_3 CH_4 + 2O_2 -> CO_2 + 2H_2O
Install the asciichem gem to see this rendered.
Source Rendered
H-O-H H_2C=CH_2 HC#CH
Install the asciichem gem to see this rendered.
Source Rendered
1s^2 2s^2 2p^6 1s^2 2s^2 2p^6 3s^2 3p^6 4s^2 3d^10
Install the asciichem gem to see this rendered.
Terminal window
gem install asciichem
asciichem convert -i "2H_2 + O_2 -> 2H_2O" -t mathml
asciichem convert -i "2H_2 + O_2 -> 2H_2O" -t latex
asciichem roundtrip -i "2H_2 + O_2 -> 2H_2O"
Play