We analyse the eigenvectors of the adjacency matrix of a critical Erdős–Rényi graph $${\mathbb {G}}(N,d/N)$$
G
(
N
,
d
/
N
)
, where d is of order $$\log N$$
log
N
. We show that its spectrum splits into two phases: a delocalized phase in the middle of the spectrum, where the eigenvectors are completely delocalized, and a semilocalized phase near the edges of the spectrum, where the eigenvectors are essentially localized on a small number of vertices. In the semilocalized phase the mass of an eigenvector is concentrated in a small number of disjoint balls centred around resonant vertices, in each of which it is a radial exponentially decaying function. The transition between the phases is sharp and is manifested in a discontinuity in the localization exponent $$\gamma (\varvec{\mathrm {w}})$$
γ
(
w
)
of an eigenvector $$\varvec{\mathrm {w}}$$
w
, defined through $$\Vert \varvec{\mathrm {w}} \Vert _\infty / \Vert \varvec{\mathrm {w}} \Vert _2 = N^{-\gamma (\varvec{\mathrm {w}})}$$
‖
w
‖
∞
/
‖
w
‖
2
=
N
-
γ
(
w
)
. Our results remain valid throughout the optimal regime $$\sqrt{\log N} \ll d \leqslant O(\log N)$$
log
N
≪
d
⩽
O
(
log
N
)
.