We present an O(n log n)-time algorithm that determines whether a given n-gon in the plane is weakly simple. This improves upon an O(n 2 log n)-time algorithm by Chang, Erickson, and Xu [6]. Weakly simple polygons are required as input for several geometric algorithms. As such, recognizing simple or weakly simple polygons is a fundamental problem.