A semiconductor device, comprising: a first semiconductor layer of a first conductivity type; a second semiconductor layer of a second conductivity type that is formed near a surface of the first semiconductor layer; a first main electrode that is electrically connected to the second semiconductor layer; a third semiconductor layer of the second conductivity type that neighbors the first semiconductor layer and is formed near a surface of the first semiconductor layer opposite to the second semiconductor layer; a fourth semiconductor layer of the first conductivity type that is selectively disposed in an upper portion of the third semiconductor layer; a second main electrode that is electrically connected to the third semiconductor layer and the fourth semiconductor layer; a trench whose side face is in contact with the third semiconductor layer and the fourth semiconductor layer, while reaching the first semiconductor layer; a gate electrode that is formed by a sidewall of polysilicon along the side face of the trench; and a polysilicon electrode that is disposed away from the gate electrode within the trench and electrically connected to the second main electrode, wherein the polysilicon electrode is electrically connected to the second main electrode through a first contact hole which is discontinuously disposed on the polysilicon electrode, characterized in that at least a part of a first insulator film between the polysilicon electrode and the first semiconductor layer is thicker than a second insulator film between the gate electrode and the first semiconductor layer, and an upper surface of an outer periphery portion of the first insulator film forms a taper surface that lowers toward the gate electrode, and an end face of the polysilicon electrode is disposed on the taper surface. a first semiconductor layer of a first conductivity type; a second semiconductor layer of a second conductivity type that is formed near a surface of the first semiconductor layer; a first main electrode that is electrically connected to the second semiconductor layer; a third semiconductor layer of the second conductivity type that neighbors the first semiconductor layer and is formed near a surface of the first semiconductor layer opposite to the second semiconductor layer; a fourth semiconductor layer of the first conductivity type that is selectively disposed in an upper portion of the third semiconductor layer; a second main electrode that is electrically connected to the third semiconductor layer and the fourth semiconductor layer; a trench whose side face is in contact with the third semiconductor layer and the fourth semiconductor layer, while reaching the first semiconductor layer; a gate electrode that is formed by a sidewall of polysilicon along the side face of the trench; and a polysilicon electrode that is disposed away from the gate electrode within the trench and electrically connected to the second main electrode, wherein the polysilicon electrode is electrically connected to the second main electrode through a first contact hole which is discontinuously disposed on the polysilicon electrode, characterized in that at least a part of a first insulator film between the polysilicon electrode and the first semiconductor layer is thicker than a second insulator film between the gate electrode and the first semiconductor layer, and an upper surface of an outer periphery portion of the first insulator film forms a taper surface that lowers toward the gate electrode, and an end face of the polysilicon electrode is disposed on the taper surface.