ENOfficial
It was narrated that Hamzah said: "I asked the Messenger of Allah (ﷺ) about fasting while traveling. He said: 'If you wish to fast then fast, and if you wish not to fast then do not fast."'
Source: sunnah.com
Other translations
Arabic
أَخْبَرَنَا سُوَيْدُ بْنُ نَصْرٍ، قَالَ أَنْبَأَنَا عَبْدُ اللَّهِ، عَنْ عَبْدِ الْحَمِيدِ بْنِ جَعْفَرٍ، عَنْ عِمْرَانَ بْنِ أَبِي أَنَسٍ، عَنْ سُلَيْمَانَ بْنِ يَسَارٍ، عَنْ حَمْزَةَ، قَالَ سَأَلْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنِ الصَّوْمِ فِي السَّفَرِ قَالَ " إِنْ شِئْتَ أَنْ تَصُومَ فَصُمْ وَإِنْ شِئْتَ أَنْ تُفْطِرَ فَأَفْطِرْ " .
sunnah.com