A promising energy source for many current and future applications is a ribbon-like device that could simultaneously harvest and store energy. Due to the high flexibility and weavable property, a fabric/matrix made using these ribbons could be highly beneficial for powering wearable electronics. Unlike the approach of using two separate devices, here we report a ribbon that integrates a solar cell and a supercapacitor. The electrons generated by the solar cell are directly transferred and stored on the reverse side of its electrode which in turn also functions as an electrode for the supercapacitor. When the flexible solar ribbon is illuminated with simulated solar light, the supercapacitor holds an energy density of 1.15 mWh cm−3 and a power density of 243 mW cm−3. Moreover, these ribbons are successfully woven into a fabric form. Our all-solid-state ribbon unveils a highly flexible and portable self-sufficient energy system with potential applications in wearables, drones and electric vehicles.