A device for igniting/re-igniting the flame for a gas burner, for a cooktop, capable of receiving a supply voltage from a source of supply and configured for receiving a signal representing the presence of the flame, characterized in that said device for igniting/re-igniting the flame is configured for activating a circuit for activating the spark (70) and configured for generating sparks for igniting the flame when said signal representing the presence of the flame indicates absence of flame and for interrupting the generation of sparks when said signal indicates the presence of flame, characterized in that said device for igniting/re-igniting the flame comprises an anti-inversion circuit (40) configured for uncoupling said ignition/re-ignition device from the direction of insertion of a supply plug of said device into a domestic power outlet, rendering the device insensitive to the polarity adopted in the connection between said plug and said outlet.