  We completely characterize the boundedness on $L^p$ spaces and on Wiener
amalgam spaces of the short-time Fourier transform (STFT) and of a special
class of pseudodifferential operators, called localization operators.
Precisely, a well-known STFT boundedness result on $L^p$ spaces is proved to be
sharp. Then, sufficient conditions for the STFT to be bounded on the Wiener
amalgam spaces $W(L^p,L^q)$ are given and their sharpness is shown.
Localization operators are treated similarly. Using different techniques from
those employed in the literature, we relax the known sufficient boundedness
conditions for localization operators on $L^p$ spaces and prove the optimality
of our results. More generally, we prove sufficient and necessary conditions
for such operators to be bounded on Wiener amalgam spaces.
