There is increasing interest in carbon capture, utilisation and storage (CCUS) and hydrogen-based technologies for decarbonising energy systems and providing flexibility. However, the overall value of these technologies is vigorously debated. Value chain optimisation can determine how carbon dioxide and hydrogen technologies will fit into existing value chains in the energy and chemicals sectors and how effectively they can assist in meeting climate change targets. This is the first study to model and optimise the integrated value chains for carbon dioxide and hydrogen, providing a whole-system assessment of the role of CCUS and hydrogen technologies within the energy system. The results show that there are opportunities for CCUS to decarbonise existing power generation capacity but long-term decarbonisation and flexibility can be achieved at lower cost through renewables and hydrogen storage. Methanol produced from carbon capture and utilisation (CCU) becomes profitable at a price range of £72-102/MWh, compared to a current market price of about £52/MWh. However, this remains well below existing prices for transport fuels, so there is an opportunity to displace existing fuel demands with CCU products. Nonetheless, the scope for decarbonisation from these CCU pathways is small. For investment in carbon capture and storage to become attractive, additional drivers such as decarbonisation of industry and negative emissions policies are required. The model and the insights presented in this paper will be valuable to policymakers and investors for assessing the potential value of the technologies considered and the policies required to incentivise their uptake.