We establish an analog Hardy inequality with sharp constant involving exponential weight function. The special case of this inequality (for n=2) leads to a direct proof of Onofri inequality on S^2.