We prove that Boolean functions on $S_n$ whose Fourier transform is highly concentrated on irreducible representations indexed by partitions of $n$ whose largest part has size at least $n-t$ are close to being unions of cosets of stabilizers of $t$-tuples. We also obtain an edge-isoperimetric inequality for the transposition graph on $S_n$ which is asymptotically sharp for sets of measure $1/\mathit{poly}(n)$. We then combine both results to obtain a best-possible edge-isoperimetric inequality for sets of size $(n-t)!$ where $n$ is large compared to $t$, confirming a conjecture of Ben-Efraim in these cases.