An ultrasonic sensor includes: a substrate disposed across an XY plane; a plurality of spaces formed in the substrate in at least one direction of an X-axis direction and a Y-axis direction; a vibrating plate that is provided on the substrate such that the spaces are enclosed and that has a first surface on the substrate side and a second surface facing the first surface; a piezoelectric element that is provided at a portion on the second surface side of the vibrating plate that corresponds to the space and that transmits and/or receives an ultrasonic wave; a surrounding plate that is provided on the second surface side of the vibrating plate and surrounds a peripheral region of the piezoelectric element; and a support member provided at a position, at which the support member is not overlapped with the piezoelectric element, between a surface of the surrounding plate on the piezoelectric element side and the second surface of the vibrating plate.