Changing YouTube to mp3 in itself is just not unlawful. However In case the YouTube file has content which has copyrights, and you also are redistributing it with no consent it might be unlawful and is particularly up to you to generally be chargeable for dealing with the rights on https://www.diigo.com/item/note/a5xhu/9vwg?k=3201fba7963cfeb1e10123b331d16ee6