Iris recognition has received increasing attention in the field of biometrics due to its high performance in human identification. A challenge of iris recognition is to extract the small-size data with sufficient information from distinctive iris patterns. We propose a novel feature extraction algorithm for iris recognition, which utilizes a bank of Gabor filters and an effective encoding method. In image preprocessing, the lower portion of the iris is normalized and unwrapped into a rectangular block where the occluded area is masked out. Then multichannel Gabor filters are used to decompose the iris block. An iris code is generated by analyzing and encoding the horizontal variation of each filtered image. Finally, a feature selection scheme is adopted to remove redundant features to reduce the data size and improve the performance. Experimental results on public iris databases show that the proposed approach has a smaller code size and a lower equal error rate.