A Pb-free solder alloy contains 4-12 wt % of Zn, 0.5-4 wt % of Bi, 0.5-5 wt % of In, 0.005-0.5 wt % of P, 0.001-0.5 wt % of Zr and at least one selected from a group consisting of: 0-0.1 wt % of Y, 0-0.2 wt % of Ge, 0-0.05 wt % of Mg, 0-0.02 wt % of B, 0-0.05 wt % of Al, 0-0.2 wt % of Ni and 0-0.3 wt % of Ag. And a balance of the Pb-free solder alloy is Sn.