There is pressure on the line. By the book you are suppose to kill power to the fuel pump then run engine to release pressure.
I don't worry about the pressure. I use paper towels or rag around the filter to keep gas away from me. I then remove the filter. I wait for a while before restarting the engine to allow for gas to evaporate.
Make sure you do it outside and hopefully a breeze to blow vapors away.
Use proper sized wrenches on the fuel line connectors. Doesn't matter what kind of wrench or pliers is used on filter.