The short version
A GFCI does not need earth to work. It compares the current on the hot conductor with the current on the neutral and trips on the difference (guide 1). A generator or an inverter is a source like any other, so a GFCI cord plugged into one behaves the way it does on the wall. The complications come from the neutral, and from what people plug in.
Bonded neutral and floating neutral
In a building, the neutral is connected to earth once, at the service. A portable generator does one of two things. A bonded-neutral generator ties its neutral to its frame (and so to the ground pin of its receptacles) inside the machine. A floating-neutral generator leaves the neutral isolated from the frame. Most open-frame contractor generators are bonded. Most inverter generators and many smaller units float. The bond is often a screw or a jumper, and the manual will say which you have.
On a floating-neutral generator a single fault from a hot conductor to the frame does not complete a circuit, so no current flows and nothing trips. That sounds safe, and for the first fault it is. It is the second fault that hurts: once one conductor has found the frame, the frame is live with respect to the other conductor, and the next person to touch it and the ground at the same time gets the full voltage. A GFCI on the cord still catches that shock, because the current through the person leaves on one conductor and does not return on the other.
Why the code wants a GFCI there anyway
NEC 445.20 requires GFCI protection on the 125 V, 15 A and 20 A receptacles of portable generators rated 15 kW or less, with an allowance for unbonded generators to use a listed cord-and-plug GFCI instead of a built-in device. The 2020 edition widened that to the 125/250 V receptacles as well. OSHA 1926.404(b)(1) covers the job site regardless of what powers it: GFCI protection or an assured equipment grounding conductor program, and the GFCI is the one you can actually buy off the shelf.
The generator's own receptacles may already carry GFCIs. If they do not, or if you are pulling power off a 30 A twist-lock that has none, a GFCI extension cord with a NEMA L5-15P or 5-15P plug is how the tools at the end of the run get protected.
When it trips the moment you plug in
Almost always a second neutral-to-ground bond. The generator bonds neutral to frame, and something downstream bonds it again: a travel trailer or RV whose distribution panel bonds neutral, a house connected through a transfer switch that does not switch the neutral, a piece of equipment wired with neutral and ground tied together. Now part of the neutral current returns on the ground conductor instead of the neutral. The GFCI sees the imbalance and trips, and it is right to. The cure is to remove one of the two bonds. On newer generators there is a switch for exactly this; on an RV, the bond belongs in the pedestal or the generator, never in both.
The second cause is a load that leaks. Heaters with damp mineral-insulated elements, submersible pumps, older power tools with worn brushes and a wet motor, deicing cable with a nicked jacket. Unplug everything, reset, and add loads back one at a time. Guide 7 is the full checklist.
When it will not reset at all
A few GFCI designs check for a grounded neutral before they will close, and refuse to reset on a floating source. Most modern UL 943 devices do not have this problem; if yours does, the manufacturer will say so and the fix is a bonded-neutral source or a different device. More often, "will not reset" means there is no power on the line side (check the generator's own breaker), or a real fault is still present downstream.
Inverters
An inverter generator, a battery inverter in a van, and the inverter on a solar array are all sources with electronics between the energy and the outlet. Three things matter for a GFCI.
- Neutral bonding, as above. Small inverters often float. Some bond the neutral to the chassis. Read the manual, and never assume the inverter behaves like the wall.
- Waveform. A pure-sine inverter looks like the grid to the GFCI. A modified-sine inverter puts a stepped waveform on the line with fast edges and harmonic content, and a few GFCIs trip on it with nothing wrong downstream. If a cord trips on a modified-sine inverter and holds on a pure-sine one, the inverter is the cause.
- Output voltage. A 120 V GFCI wants roughly 102 to 132 V to operate its electronics. An inverter sagging under load, or a 240 V split-phase inverter feeding a 120 V device the wrong way, will give you trips or a device that will not reset.
What we tell customers
Use a GFCI cord on a generator. Bond the neutral in one place and one place only. If the cord trips at plug-in with nothing on the end of it, look for the second bond before you blame the cord. If it trips with a load, test the load on a known-good outlet indoors. And press TEST on the cord itself before every job, because a generator on a wet site is exactly where you want to know it works.
Next: How to test a GFCI cord.