Gene expression levels carry information about signals that have functional significance for the organism. Using the gap gene network in the fruit fly embryo as an example, we show how this information can be decoded, building a dictionary that translates expression levels into a map of implied positions. The optimal decoder makes use of graded variations in absolute expression level, resulting in positional estimates that are precise to ~1% of the embryos length. We test this optimal decoder by analyzing gap gene expression in embryos lacking some of the primary maternal inputs to the network. The resulting maps are distorted, and these distortions predict, with no free parameters, the positions of expression stripes for the pair-rule genes in the mutant embryos.