ASCII to Chemical Elements Converter
Convert any text to chemical elements by mapping ASCII character codes to periodic table elements. Visualize text as element cards instantly.
About
Every printable character has an ASCII code between 32 and 126. This tool maps each code to one or two chemical elements from the periodic table (atomic numbers Z = 1 to 118). A character with code c ≤ 118 maps directly to element Z = c. Codes above 118 are decomposed into two valid atomic numbers. The decomposition is deterministic, not random. Incorrect mapping breaks the reversibility of the encoding. This matters if you use element sequences for puzzles, escape rooms, or educational worksheets where students must decode a message from element symbols.
The converter handles the full printable ASCII range including space (32), digits, punctuation, and both letter cases. Note: control characters below 32 and DEL (127) are excluded since they have no visual representation. The tool assumes standard US-ASCII encoding. Extended characters (UTF-8 above 127) are stripped with a warning.
Formulas
The mapping function converts each character to its ASCII code, then resolves it to chemical element(s):
For direct mapping when the code falls within the periodic table range:
For codes exceeding 118, decomposition splits the code into two valid atomic numbers:
Both a and b are guaranteed to fall within [1, 118] since the maximum printable ASCII code is 126, yielding a = 63 and b = 63.
Where c = ASCII character code, PT(Z) = periodic table lookup by atomic number Z, a and b = the two atomic numbers from decomposition.
Reference Data
| Z | Symbol | Element Name | Mass (u) | ASCII Char |
|---|---|---|---|---|
| 1 | H | Hydrogen | 1.008 | - |
| 32 | Ge | Germanium | 72.63 | Space |
| 33 | As | Arsenic | 74.922 | ! |
| 48 | Cd | Cadmium | 112.41 | 0 |
| 57 | La | Lanthanum | 138.91 | 9 |
| 65 | Tb | Terbium | 158.93 | A |
| 72 | Hf | Hafnium | 178.49 | H |
| 79 | Au | Gold | 196.97 | O |
| 90 | Th | Thorium | 232.04 | Z |
| 97 | Bk | Berkelium | [247] | a |
| 104 | Rf | Rutherfordium | [267] | h |
| 111 | Rg | Roentgenium | [282] | o |
| 118 | Og | Oganesson | [294] | v |
| 119 | Exceeds periodic table → split into two elements | w | ||
| 120 | Split: 60 (Nd) + 60 (Nd) | x | ||
| 121 | Split: 61 (Pm) + 60 (Nd) | y | ||
| 122 | Split: 61 (Pm) + 61 (Pm) | z | ||
| 123 | Split: 62 (Sm) + 61 (Pm) | { | ||
| 124 | Split: 62 (Sm) + 62 (Sm) | | | ||
| 125 | Split: 63 (Eu) + 62 (Sm) | } | ||
| 126 | Split: 63 (Eu) + 63 (Eu) | ~ | ||