In this paper we describe and implement a long-range Brillouin optical time-domain analysis (BOTDA) sensor, for both temperature and strain measurements, using optical pulse coding techniques. A theoretical analysis of Simplex coding applied to BOTDA systems is presented and experimentally demonstrated for both Brillouin loss and Brillouin gain configurations. With the proposed technique, ~7.1 dB and ~10.3 dB of signal-to-noise ratio improvements are demonstrated in BOTDA measurements using 127-bit and 511-bit Simplex codes, respectively. This feature allows us to extend the dynamic range of the measurements, overcoming the limitations to the maximum usable optical power imposed by pump depletion and modulation instability; thus, the sensing range can be extended by several tens of kilometers while keeping meter-scale spatial resolution. Experimental results show the capabilities of optical pulse coding techniques to achieve 1 m spatial resolution over 50 km of standard single-mode fiber enabling temperature and strain resolutions equal to 2.2 °C and 44 µε, respectively.