It's easy to convert NMEA data to GPX format using ExpertGPS. You can convert NMEA data in real-time (coming from a GPS receiver over a serial connection) or convert a text file containing NMEA sentences to a GPX file.
The best way to convert NMEA log files to GPX is to use the Import NMEA Log Files Command in ExpertGPS. Click Import on the File menu and select a text file with an .nmea extension (rename your .txt file if needed). ExpertGPS reads the NMEA sentences and creates GPX <trk> elements (tracklogs) from the data.
The Tracking command in ExpertGPS reads NMEA data from a serial port, USB to Serial Adapter, or Bluetooth NMEA source. When you exit Tracking mode, ExpertGPS will automatically save the NMEA data as a track. Save the track as a GPX file to finish converting NMEA to GPX.