Although feedback loops are essential in development, their molecular implementation and precise functions remain elusive. Using enhancer knockout in mice, we demonstrate that a direct, positive autoregulatory loop amplifies and maintains the expression of Krox20, a transcription factor governing vertebrate hindbrain segmentation. By combining quantitative data collected in the zebrafish with biophysical modelling that accounts for the intrinsic stochastic molecular dynamics, we dissect the loop at the molecular level. We find that it underpins a bistable switch that turns a transient input signal into cell fate commitment, as we observe in single cell analyses. The stochasticity of the activation process leads to a graded input-output response until saturation is reached. Consequently, the duration and strength of the input signal controls the size of the hindbrain segments by modulating the distribution between the two cell fates. Moreover, segment formation is buffered from severe variations in input level. Finally, the progressive extinction of Krox20 expression involves a destabilization of the loop by repressor molecules. These mechanisms are of general significance for cell type specification and tissue patterning.