NLopt is a library for nonlinear optimization that allows one to select from a wide variety of optimization algorithms by changing a single parameter. Its features include both local and global optimization, unconstrained, bound-constrained, or nonlinear-inequality constrained problems, and optimization using function values only or using derivatives if they are available. It was initially begun as a wrapper around several existing optimization packages, but it now also includes original implementations of several algorithms for which no free code was available. It provides interfaces callable from C/C++, Fortran, Matlab, GNU Octave, Python, and GNU Guile.