We study the formation of B I lines in a grid of cool stellar model atmospheres without the assumption of local thermodynamic equilibrium (LTE). The non-LTE modelling includes the effect of other lines blending with the B I resonance lines. Except for the cases where the B I lines are very strong, the departures from LTE relevant for the resonance lines can be described as an overionisation effect and an optical-pumping effect. This causes the lines to be weaker than in LTE so that an abundance analysis assuming LTE will underestimate stellar boron abundances. We present non-LTE abundance corrections useful to improve on abundances derived from the B I 250 nm and 209 nm lines under the LTE assumption. Application of the results on literature data indicates that the B/Fe ratio in metal-poor stars is constant.