Switches and rectification devices are fundamental components used for controlling the flow of energy in numerous applications. Thermal and acoustic rectifiers have been proposed for use in biomedical ultrasound applications, thermal computers, energy- saving and -harvesting materials, and direction-dependent insulating materials. In all these systems the transition between transmission states is smooth with increasing signal amplitudes. This limits their effectiveness as switching and logic devices, and reduces their sensitivity to external conditions as sensors. Here we overcome these limitations by demonstrating a new mechanism for tunable rectification that uses bifurcations and chaos. This mechanism has a sharp transition between states, which can lead to phononic switching and sensing. We present an experimental demonstration of this mechanism, applied in a mechanical energy rectifier operating at variable sonic frequencies. The rectifier is a granular crystal, composed of a statically compressed one-dimensional array of particles in contact, containing a light mass defect near a boundary. As a result of the defect, vibrations at selected frequencies cause bifurcations and a subsequent jump to quasiperiodic and chaotic states with broadband frequency content. We use this combination of frequency filtering and asymmetrically excited bifurcations to obtain rectification ratios greater than 10(4). We envisage this mechanism to enable the design of advanced photonic, thermal and acoustic materials and devices.