PROBLEM TO BE SOLVED: To provide an ultrasonic sensor having high azimuth resolution and an electronic device.SOLUTION: The ultrasonic sensor includes: a substrate having a surface on which a plurality of recesses are provided and a surface on which a plurality of ultrasonic elements are provided and an acoustic layer filled in the recesses. When viewed from a thickness direction of the substrate, the ultrasonic elements are provided at a position overlapping the recesses. The interface facing a bottom surface of the recesses of the acoustic layer has an inclination with respect to the bottom surface of the recesses.SELECTED DRAWING: Figure 3COPYRIGHT: (C)2019,JPO&INPIT【課題】方位分解能が高い超音波センサー、及び電子機器を提供する。【解決手段】超音波センサーは、複数の凹部が設けられた面と複数の超音波素子が設けられた面とが互いに表裏となる基板と、前記凹部に充填される音響層と、を備え、前記基板の厚み方向から見て、前記超音波素子は、前記凹部と重なる位置に設けられ、前記音響層の前記凹部の底面と対向する界面は、前記凹部の底面に対して傾きを有する。【選択図】図3