A detailed approach is described for the vibrational spectroscopic encoding of polystyrene-based resin beads by converting the infrared absorption peaks suitable for encoding (encoding peaks) into barcodes. Based on combining the FT-IR measurements and the quantum-chemical computations, the vibrational characteristics of p-tert-butylstyrene monomer, polystyrene and poly(p-tert-butylstyrene) resin beads are analyzed, which are helpful for the selection of encoding peaks. The vibrational spectroscopic encoding of polystyrene-based resin beads could be obtained by converting the wavenumber, intensity and full width at half maximum (FWHM) of the encoding peaks into barcodes automatically through a computer program designed in our laboratory.