Abstract-In this paper, the optimal jamming of wireless localization systems is investigated. Two optimal power allocation schemes are proposed for jammer nodes in the presence of total and peak power constraints. In the first scheme, power is allocated to jammer nodes in order to maximize the average Cramér-Rao lower bound (CRLB) of target nodes, whereas in the second scheme, the power allocation is performed for the aim of maximizing the minimum CRLB of target nodes. Both the schemes are formulated as linear programs, and a closed-form solution is obtained for the first scheme. For the second scheme, under certain conditions, the property of full total power utilization is specified, and a closed-form solution is obtained when the total power is lower than a specific threshold. In addition, it is shown that non-zero power is allocated to at most N T jammer nodes according to the second scheme in the absence of peak power constraints, where N T is the number of target nodes. In the presence of parameter uncertainty, robust versions of the power allocation schemes are proposed. Simulation results are presented to investigate the performance of the proposed schemes and to illustrate the theoretical results.