The problem of optimal pulse design for light-emitting diode (LED) transmitters is investigated in an indoor visible light positioning (VLP) setup. In particular, the problem of localization performance maximization is formulated for both asynchronous and synchronous VLP systems with consideration of practical limitations related to power consumption, illumination levels, and/or effective bandwidths, while quantifying the localization accuracy via the Cramér–Rao lower bound (CRLB). In both asynchronous and synchronous scenarios, the formulated problems are shown to be convex optimization problems, and some properties of the optimal solutions are derived. In addition, the pulse design problem for minimum power consumption is formulated under a CRLB constraint along with other practical limitations; and this problem is also revealed to be a convex optimization problem. Based on the solutions of the proposed optimization problems, pulse design procedures are described to determine the parameters of optimal pulse shapes. Numerical results illustrate the benefits of the proposed optimal pulse design approach in comparison with the state-of-the-art optimal power allocation scheme in the literature. In particular, electrical power consumption can be reduced by around 45% or localization accuracy can be improved by as much as 25% via the proposed optimal pulse design approach in certain scenarios.