An optical design method of a fully customizable collimating lens is proposed. The initial model of the complete lens is constructed by two parts. One part is calculated by the total internal reflection algorithm; the other part is constructed by trial-and-error method. The lens is further optimized by normal vector correction and high- and low-angle compensation. The optical performance of the fully customizable collimating lens is studied. It is proven to have good collimation performance with a divergence angle of 1.8° at 50% of the maximum luminous intensity; the uniformity is as high as 98.4%.