Covariate balance is crucial for an unconfounded descriptive or causal comparison. However, lack of balance is common in observational studies. This article considers weighting strategies for balancing covariates. We define a general class of weights-the balancing weights-that balance the weighted distributions of the covariates between treatment groups. These weights incorporate the propensity score to weight each group to an analyst-selected target population. This class unifies existing weighting methods, including commonly used weights such as the inverse-probability weights as special cases. General large-sample results on nonparametric estimation based on these weights are derived. We further propose a new weighting scheme, the overlap weights, in which each unit's weight is proportional to the probability of that unit being assigned to the opposite group. The overlap weights are bounded, minimize the asymptotic variance of the weighted average treatment effect among the class of balancing weights, and possess a desirable small-sample exact balance property. Two applications illustrate this method and compare it with other approaches.