Although peptides have many biological and biomedical implications, an accurate method predicting their equilibrium structural ensembles from amino acid sequences and suitable for large-scale experiments is still missing. We introduce a new approach-PEP-FOLD-to the de novo prediction of peptides and miniproteins. It first predicts, in the terms of a Hidden Markov Model-derived structural alphabet, a limited number of local conformations at each position of the structure. It then performs their assembly using a greedy procedure driven by a coarse-grained energy score. On a benchmark of 52 peptides with 9-23 amino acids, PEP-FOLD generates lowest-energy conformations within 2.8 and 2.3 A Calpha root-mean-square deviation from the full nuclear magnetic resonance structures (NMR) and the NMR rigid cores, respectively, outperforming previous approaches. For 13 miniproteins with 27-49 amino acids, PEP-FOLD reaches an accuracy of 3.6 and 4.6 A Calpha root-mean-square deviation for the most-native and lowest-energy conformations, using the nonflexible regions identified by NMR. PEP-FOLD simulations are fast-a few minutes only-opening therefore, the door to in silico large-scale rational design of new bioactive peptides and miniproteins.