That depends on the strength of the filter. Many of them are not safe.
This advice is from the American Astronomical Society web site.
“What about welding filters? The only ones that are safe for direct viewing of the Sun with your eyes are those of Shade 12 or higher. These are much darker than the filters used for most kinds of welding. If you have an old welder’s helmet around the house and are thinking of using it to view the Sun, make sure you know the filter’s shade number. If it’s less than 12 (and it probably is), don’t even think about using it to look at the Sun. Many people find the Sun too bright even in a Shade 12 filter, and some find the Sun too dim in a Shade 14 filter — but Shade 13 filters are uncommon and can be hard to find. Our Reputable Vendors of Solar Filters & Viewers page doesn’t list any suppliers of welder’s filters, only suppliers of special-purpose filters made for viewing the Sun.”
The Great American Eclipse Series
The Great American Eclipse Series  – All of my eclipse articles are listed at this link. Check back for new articles as they appear. As of today (August 9) there are 22 articles in the series.