The two-dimensional bin packing problem asks for a non-overlapping, axis-parallel packing of a given list of rectangles into a minimum number of unit squares. We present a polynomial time algorithm with an approximation guarantee of 2 - which is optimal unless P=NP.