The turbulent/non-turbulent interface is analysed in a direct numerical simulation of a boundary layer in the Reynolds number range Re-theta = 2800-6600, with emphasis on the behaviour of the relatively large-scale fractal intermittent region. This requires the introduction of a new definition of the distance between a point and a general surface, which is compared with the more usual vertical distance to the top of the layer. Interfaces are obtained by thresholding the enstrophy field and the magnitude of the rate-of-strain tensor, and it is concluded that, while the former are physically relevant features, the latter are not. By varying the threshold, a topological transition is identified as the interface moves from the free stream into the turbulent core. A vorticity scale is defined which collapses that transition for different Reynolds numbers, roughly equivalent to the root-mean-squared vorticity at the edge of the boundary layer. Conditionally averaged flow variables are analysed as functions of the new distance, both within and outside the interface. It is found that the interface contains a non-equilibrium layer whose thickness scales well with the Taylor microscale, enveloping a self-similar layer spanning a fixed fraction of the boundary-layer thickness. Interestingly, the straining structure of the flow is similar in both regions. Irrotational pockets within the turbulent core are also studied. They form a self-similar set whose size decreases with increasing depth, presumably due to breakup by the turbulence, but the rate of viscous diffusion is independent of the pocket size.