Apparatus for forming transversal welds on a composite web material, comprising at least two superimposed sheets of material, suitable for use in the production of sanitary articles, comprising: a feeding unit including first and second feeding means configured to advance the composite web along a main straight direction X at a speed V1. an ultrasonic welding unit 80 arranged between the first and second feeding means, comprising at least one ultrasound source coupled to a sonotrode having a flat welding surface and an anvil unit having at least one anvil element movable along a closed path, which has a straight portion parallel to the main direction X.