A semiconductor device including: a semiconductor layer; an electrode pad
provided above the semiconductor layer; an insulating layer provided
above the electrode pad and having an opening which exposes at least part
of the electrode pad; and a metal electrode provided at least in the
opening and including a first portion provided above the electrode pad,
and a second portion provided above part of the insulating layer
positioned outside the electrode pad, an area of a top surface of the
second portion being larger than an area of a top surface of the first
portion.