The intrinsic variation in the near-edge X-ray absorption fine structure (NEXAFS) spectra of peptides and proteins provide an opportunity to identify and map them in various biological environments, without additional labeling. In principle, with sufficiently accurate spectra, peptides (<50 amino acids) or proteins with unusual sequences (e.g., cysteine- or methionine-rich) should be differentiable from other proteins, since the NEXAFS spectrum of each amino acid is distinct. To evaluate the potential for this approach, we have developed X-SpecSim, a tool for quantitatively predicting the C, N, and O 1s NEXAFS spectra of peptides and proteins from their sequences. Here we present the methodology for predicting such spectra, along with tests of its precision using comparisons to the spectra of various proteins and peptides. The C 1s, N 1s, and O 1s spectra of two novel antimicrobial peptides, Indolicidin (ILPWKWPWWPWRR-NH2) and Sub6 (RWWKIWVIRWWR-NH2), as well as human serum albumin and fibrinogen are reported and interpreted. The ability to identify, differentiate, and quantitatively map an antimicrobial peptide against a background of protein is demonstrated by a scanning transmission X-ray microscopy study of a mixture of albumin and sub6.