NMEA 0183 Decoder and Checksum Calculator (Online Tool)
NMEA 0183 is the plain-text language spoken by GPS receivers, chartplotters, depth sounders, wind instruments and autopilots. Each line, or “sentence”, packs time, position, speed, depth or wind data into comma-separated fields that end with a checksum. Paste a sentence below and the tool splits it into fields, explains what each field means and verifies the checksum, so you can debug a GPS module or marine network in seconds.
Anatomy of an NMEA 0183 sentence
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
│└┬┘└┬┘ └────────────── data fields ──────────────────────┘ └┬┘
│ │ └ sentence type (GGA) └ checksum
│ └ talker ID (GP = GPS)
└ start character ($, or ! for AIS)- Start character:
$for normal sentences,!for encapsulated data such as AIS. - Talker ID: Two letters for the source device: GP (GPS), GN (multi-GNSS), GL (GLONASS), GA (Galileo), GB (BeiDou), SD (depth sounder), WI (wind instrument), HC (magnetic compass) and so on.
- Sentence type: Three letters that define the data layout: RMC, GGA, VTG, DBT, MWV…
- Fields: Comma-separated values. An empty field (two commas in a row) means the value is not available.
- Checksum: An asterisk followed by two hexadecimal digits.
- End: Each sentence ends with carriage return and line feed (
) and is at most 82 characters long.
How the checksum is calculated
The checksum is the XOR of every character between $ (or !) and *, written as two hexadecimal digits. It lets the receiver detect corrupted sentences.
def nmea_checksum(sentence):
body = sentence.strip().lstrip('$!').split('*')[0]
cs = 0
for ch in body:
cs ^= ord(ch)
return f"{cs:02X}"
print(nmea_checksum("$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47")) # 47If the calculated value differs from the one after the asterisk, the sentence was corrupted in transmission (noise, baud rate mismatch, a missing character) and should be discarded.
Common sentence types
| Sentence | Meaning | Key data |
|---|---|---|
| RMC | Recommended minimum GNSS data | Time, status, position, speed, course, date |
| GGA | GPS fix data | Time, position, fix quality, satellites, HDOP, altitude |
| GLL | Geographic position | Latitude, longitude, time, status |
| VTG | Track made good and ground speed | Course and speed in knots and km/h |
| GSA | DOP and active satellites | Fix type, satellites used, PDOP/HDOP/VDOP |
| GSV | Satellites in view | Satellite IDs, elevation, azimuth, SNR |
| DBT / DPT | Depth below transducer / depth of water | Depth in feet, metres, fathoms |
| MWV | Wind speed and angle | Relative or true wind |
| HDT / HDM | True / magnetic heading | Heading in degrees |
| ZDA | Time and date | UTC time, day, month, year, local zone |
Reading latitude and longitude in NMEA
Positions use degrees and decimal minutes, not decimal degrees:
4807.038,N→ 48° 07.038′ N → 48 + 7.038/60 = 48.1173°01131.000,E→ 11° 31.000′ E → 11 + 31/60 = 11.5167°
Latitude uses two digits for degrees (ddmm.mmm) and longitude uses three (dddmm.mmm). South and west become negative in decimal degrees. Convert other formats with the coordinate converter.
GGA fix quality values
| Value | Meaning |
|---|---|
| 0 | No fix |
| 1 | GPS fix (standard) |
| 2 | DGPS / SBAS fix |
| 4 | RTK fixed (centimetre-level) |
| 5 | RTK float |
| 6 | Dead reckoning (estimated) |
Troubleshooting with the decoder
- Garbled text: Usually a baud rate mismatch. Most GPS modules default to 9600 baud; marine NMEA 0183 is typically 4800 baud (38400 for high-speed AIS).
- Checksum errors: Electrical noise, long unshielded cables or a ground problem. Check wiring and grounding.
- Status V or fix quality 0: The receiver has no valid fix yet. Give it a clear view of the sky and time for a cold start.
- Empty fields: The device doesn’t provide that value, or doesn’t have it yet.
For a deeper look at the protocol, electrical interface (RS-422) and parsing in Python, read our NMEA 0183 protocol guide. Newer boats use the CAN-based NMEA 2000 network instead.
Frequently asked questions
Is the checksum mandatory?
It is optional in some older sentence types, but almost all modern devices send it, and you should always verify it in your own parser.
Why does my sentence have an empty field before the checksum?
Empty fields are normal; they mean the value is not available. In GGA, the last two fields (DGPS age and station ID) are usually empty unless you use differential corrections.
Can I use the decoder for AIS messages?
AIS sentences (!AIVDM) start with “!” and the checksum check works, but the payload is a 6-bit encoded binary message that needs a dedicated AIS decoder.







