Major histocompatibility complex (MHC)-binding peptides are essential for antigen recognition by T-cell receptors and are being explored for vaccine design. Computational methods have been developed for predicting MHC-binding peptides of fixed lengths, based on the training of relatively few non-binders. It is desirable to introduce methods applicable for peptides of flexible lengths and trained by using more diverse sets of non-binders. MHC-BPS is a web-based MHC-binder prediction server that uses support vector machines for predicting peptide binders of flexible lengths for 18 MHC class I and 12 class II alleles from sequence-derived physicochemical properties, which were trained by using 4,208 approximately 3,252 binders and 234,333 approximately 168,793 non-binders, and evaluated by an independent set of 545 approximately 476 binders and 110,564 approximately 84,430 non-binders. The binder prediction accuracies are 86 approximately 99% for 25 and 70 approximately 80% for five alleles, and the non-binder accuracies are 96 approximately 99% for 30 alleles. A screening of HIV-1 genome identifies 0.01 approximately 5% and 5 approximately 8% of the constituent peptides as binders for 24 and 6 alleles, respectively, including 75 approximately 100% of the known epitopes. This method correctly predicts 73.3% of the 15 newly published epitopes in the last 4 months of 2005. MHC-BPS is available at http://bidd.cz3.nus.edu.sg/mhc/ .