Such converters are merely technology, and technology is morally neutral; it is rarely illegal to use a specific form of technology. It's what you do with that technology that makes it legal or illegal. Youtube mp3 music.
You can use a YouTube to MP3 (or to MOV/MP4) converter legally to:
Download or convert one of your own videos to audio
Download or convert a public domain video to audio (one either produced solely by the federal government, or where the copyright has expired - which is usually 70 years after the author's death, or one in which the author has specifically released it to the public domain)
Download or convert a video to audio which has a Creative Commons license (as long as you follow the terms of that license)
Download or convert a video to audio within the specific and very narrow exceptions of "fair use" under 17 U.S. Code § 107
Download or convert a video to audio for educational use within the terms of the T.E.A.C.H. Act (if your institution complies with all of the criteria for availing itself of its provisions)
Download or convert a video to audio to create a new creative work specifically for the purpose of criticism/commentary or parody (under the very narrow criteria for those defined by the copyright law)
If your use doesn't fall into one of those specific exemptions, then you have to request written permission from the copyright owner.
This isn't specific to YouTube. Any time you use copying technology (whether it be a photocopier, a digital camera, a scanner, copying by hand, a converter program, ripping software, etc.) the copyright law  applies. Under U.S. Copyright law, the moment something is "fixed into tangible form" (i.e., turned into a video, recorded, written or sketched on a sheet of paper or napkin, etc.), it has a copyright on it, whether or not they actually file proof of that claim. And outside of the specific exceptions named above, only the person(s) or entit(ies) who created it can determine how and where it may be used.
So if you didn't create it yourself and otherwise own (or have the rights to use) all of the content in it, the only way you can do this legally is if it's one of those specific exemptions named in the bullets above. Any other use would be illegal.
If the video is not protected by copyright, used to promote hatred, racism, violent or illegal acts, then the answer is yes. But even then it may not be permitted in some places. It's a hard question answer, but here's my 2¢ worth.
If you are doing this to your own content then it's fine. If it's posted publicly without copyright then yes. If you are doing this for your own personal use, even if the content is protected by copyright, you might still be able to do so in some places, while in other places or may not be legally permitted.
If you do this to someone's video and keep it personally, then it should be safe for you, but not if you give it to someone else, even for free. You don't own the original contents, therefore no rights to redistribute to anyone, period.
Some places allow you to copy your own personally purchased commercial products like dvds, cds, videotapes, etc. as a backup media. But even in these cases you are still required to physically have the original.
Lastly, some countries have no enforcement of copyright or patents, thus is a free for all until someone gets prosecuted.
Hope this helps. Just do it with caution and thought.
There is a myth going around that they are illegal. And TBH it is a tricky thing to understand so I get why people are confused.
The software is 100% legal, it’s just the way YOU use it might not be.
Royalty free / non-copyrighted material
RE-UPLOAD TO THE INTERNET = Allowed (quote the creator)
Free copyrighted material (for example, a PewDiePie video)
Free and safe mp3 download
RE-UPLOAD TO THE INTERNET = Not Allowed
Paid copyrighted material (for example, a copyrighted song that you usually have to buy)
RE-UPLOAD TO THE INTERNET = Not Allowed