User Rating 0.0
Total Usage 0 times
Printable ASCII only (codes 32–126) 0 / 500
Enter text above and press Convert to see element cards.
Is this tool helpful?

Your feedback helps us improve.

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.

ascii chemical elements periodic table converter ascii code element symbols chemistry

Formulas

The mapping function converts each character to its ASCII code, then resolves it to chemical element(s):

f(char) = c = charCodeAt(char)

For direct mapping when the code falls within the periodic table range:

if 1 c 118 element = PT(c)

For codes exceeding 118, decomposition splits the code into two valid atomic numbers:

if c > 118 a = ceil(c2) , b = c a

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

ZSymbolElement NameMass (u)ASCII Char
1HHydrogen1.008 -
32GeGermanium72.63Space
33AsArsenic74.922!
48CdCadmium112.410
57LaLanthanum138.919
65TbTerbium158.93A
72HfHafnium178.49H
79AuGold196.97O
90ThThorium232.04Z
97BkBerkelium[247]a
104RfRutherfordium[267]h
111RgRoentgenium[282]o
118OgOganesson[294]v
119Exceeds periodic table → split into two elementsw
120Split: 60 (Nd) + 60 (Nd)x
121Split: 61 (Pm) + 60 (Nd)y
122Split: 61 (Pm) + 61 (Pm)z
123Split: 62 (Sm) + 61 (Pm){
124Split: 62 (Sm) + 62 (Sm)|
125Split: 63 (Eu) + 62 (Sm)}
126Split: 63 (Eu) + 63 (Eu)~

Frequently Asked Questions

The periodic table contains 118 confirmed elements with atomic numbers 1 through 118. Lowercase letters w through z and characters { | } ~ have ASCII codes 119 through 126, which exceed the table. These codes are split into two valid atomic numbers using a balanced halving algorithm: ceil(c/2) and c − ceil(c/2). Both resulting numbers always fall between 1 and 63, well within the periodic table.
Yes, for codes ≤ 118 the mapping is a direct bijection: atomic number equals ASCII code. For codes above 118, the two-element pair is unique because the decomposition algorithm is deterministic (always ceil then remainder). No two different ASCII codes produce the same element pair. To decode, sum the atomic numbers of paired elements or read the single element's atomic number directly.
The converter strips any character with a code outside the printable ASCII range (32-126). A toast notification warns you about removed characters. This is by design: extending to Unicode's 149,000+ code points would require element sequences of arbitrary length, making the encoding impractically verbose. Stick to standard English alphanumeric text for clean results.
Yes. Space has ASCII code 32, which maps to Germanium (Ge, Z = 32). In the output, space-mapped elements are visually separated with a gap marker so you can distinguish word boundaries from adjacent element cards.
Absolutely. The deterministic mapping means students or players can decode a message by looking up each element's atomic number and converting to ASCII characters. For escape rooms, print the element card strip without the ASCII annotations. Players need a periodic table and an ASCII chart to solve it - two layers of knowledge required.
ASCII assigns different codes to uppercase and lowercase letters. "A" = 65, "a" = 97. The converter preserves case sensitivity through this code difference. This is standard ASCII behavior, not a design choice of the tool. If case-insensitive encoding is needed, convert your text to uppercase first.