Objective To analyze structural features for spike (S) protein of the SARS-CoV-2 and to predict potential B cell and T cell epitopes using bioinformatics. Methods The amino acid sequence of S protein from the NCBI GenBank database was retrieved. Its physicochemical properties were analyzed using ProtParam online program. The secondary structure of S protein was analyzed using Lasergene software and SOPMA online service. The tertiary structure model of S protein was established by Phyre2 and Rasmol software. Finally, B cell epitopes were predicted using ABCpred, BepiPred and BcePred; T cell epitopes were predicted using IDBE software. Results S protein is a 1273 amino acid sequence with the isoelectric point at 6.24 and atomic composition as C6336H9770N1656O1894S54, which was classified as a stable and hydrophilic protein. GramierRobson method analysis revealed that the secondary structure of S protein comprised 23.5% α-helixes, 53.7% β-sheets, 14.9% β-turns and 8.33% random coils. Chou-Fasman method analysis revealed that the secondary structure of S protein comprised 20.9% α-helixes, 35.5% β-sheets, 35.2% β-turns. Online service SOPMA analysis revealed that the secondary structure of S protein comprised 28.59% α-helixes, 23.25% β-sheets, 3.38% β-turns and 44.78% random coils. The numbers of B cell epitopes according to ABCpred, BepiPred and BcePred databases were 5,11 and 6. Five epitopes for CD8+ T cell and CD4+ T cell were chosen as potential epitopes. Conclusion Bioinformatics can predict B cell and T cell epitopes in the S protein of the SARS-CoV-2, which lays a foundation for developing vaccines.