Narrative:

Total electrical failure on climb out from ZZZ. Electrical came back intermittently allowing the pilot to contact approach for clearance back to ZZZ and again to get landing clearance from ZZZ tower. No traffic conflicts during the recovery.

Google
 

Original NASA ASRS Text

Title: C172 pilot reported intermittent electrical failure and return to the departure airport.

Narrative: Total electrical failure on climb out from ZZZ. Electrical came back intermittently allowing the pilot to contact Approach for clearance back to ZZZ and again to get landing clearance from ZZZ Tower. No traffic conflicts during the recovery.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.