Perturbation formulas for TE011 mode dielectric rod resonator and for a TE011 mode circular cavity resonator are derived to determine the surface impedance Z(s)(= R(s) + jX(s)) of superconductors from measured values of resonant frequencies and unloaded Q. Also, the relation between the maximum surface current density of a superconductor, J(s) (A/m), and output power from a signal generator P(O)(W), is derived. On the basis of these analytical results, a measurement technique is proposed to evaluate the temperature and J(s) dependences of Z(s) for superconductors. The measured results of the temperature dependence of Z(s) for YBCO and copper plates, which are obtained from the f0 and Q(u) values measured for the dielectric resonator and for the cavity resonator, are presented. From these results, it is verified that the dielectric resonator is suitable for measuring X(s) for YBCO. Furthermore, from these Z(s) values the temperature dependences of the skin depth delta and the penetration depth lambda, and those of the complex conductivity sigma-r - j-sigma-i are obtained on the basis of the two-fluid model. These measured values agree well with the theoretical curves calculated by introducing the concept of the residual normal state conductivity sigma-res into sigma-r. From the J(s) dependences of Z(s) measured for the YBCO and copper plates, it is shown that the R(s) of copper does not depend on J(s), that the value for YBCO has a strong J(s) dependence, and that X(s) of YBCO has little dependence on J(s). It is verified that a dielectric resonator is preferred for measuring the J(s) dependence of Z(s), because of energy concentration, compared with a cavity resonator.