XOR NMEA 0183 Validation Tool

NMEA Sentence Checksum Validator

Use the free NMEA Sentence Checksum Validator to verify an NMEA 0183 sentence, compare the transmitted checksum with the checksum calculated from the sentence data, and generate a corrected sentence when the checksum is missing or incorrect.

✓ NMEA 0183 ✓ XOR Checksum ✓ GPS / GNSS ✓ AIS Sentences ✓ Corrected Output
NMEA
Validate NMEA Checksum
● Ready
Paste one complete NMEA sentence beginning with $ or !. CR/LF line endings are removed automatically.
NMEA Validation Result
Checksum Status
Provided
Calculated
Talker ID
Sentence Type
Checksum Input -
Sentence Information -
Corrected / Normalized Sentence
-

What Is an NMEA Sentence Checksum Validator?

An NMEA Sentence Checksum Validator checks whether the checksum attached to an NMEA 0183 sentence matches the checksum calculated from its message content. NMEA 0183 is widely used by GPS and GNSS receivers, marine electronics, navigation equipment, sensors, AIS devices, autopilots, chart plotters, and embedded positioning systems.

A checksum helps a receiving device detect accidental changes in the text sentence caused by serial communication errors, electrical noise, corrupted logs, software bugs, or damaged data.

This validator performs the calculation directly in your browser. It shows the provided checksum, independently calculated checksum, sentence talker ID, message type, and a normalized sentence containing the correct checksum.

How to Validate an NMEA 0183 Checksum

Paste the NMEA sentence

Enter a complete sentence beginning with $ or !.

Keep the checksum if available

A transmitted checksum normally appears after the asterisk as two hexadecimal characters.

Click Validate NMEA Checksum

The tool XORs the characters that belong to the NMEA checksum calculation.

Compare the values

If the supplied and calculated hexadecimal values are identical, the checksum passes validation.

Use the corrected sentence if needed

When the checksum is incorrect or missing, the validator generates a normalized sentence containing the calculated checksum.

How Is an NMEA Checksum Calculated?

An NMEA 0183 checksum is an 8-bit XOR value. The calculation starts with zero and applies the exclusive-OR operation to the ASCII value of each character between the sentence start delimiter and the checksum delimiter.

The initial $ or ! is not included. The * checksum delimiter and the two checksum characters following it are also excluded.

Conceptual calculation: checksum = 0 checksum = checksum XOR character1 checksum = checksum XOR character2 checksum = checksum XOR character3 … The final 8-bit value is written as two hexadecimal digits.

This XOR method is the standard checksum mechanism used by NMEA 0183 sentences. :contentReference[oaicite:2]{index=2}

NMEA Checksum Example

Consider this widely used GGA sentence:

$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47 The checksum calculation processes: GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,, Calculated checksum: 0x47 Provided checksum: 0x47 Result: VALID

The result matches the standard XOR calculation for this example. :contentReference[oaicite:3]{index=3}

NMEA Sentence Structure

A conventional NMEA 0183 data sentence is a printable text message divided into fields. Understanding the structure makes checksum troubleshooting much easier.

Part Example Purpose
Start delimiter $ Marks the beginning of a conventional NMEA sentence.
Talker ID GP Identifies the originating system or talker.
Sentence formatter GGA Identifies the message type.
Fields ,123519,... Contain the actual sentence data.
Checksum delimiter * Separates sentence data from the checksum.
Checksum 47 Two hexadecimal characters representing the XOR result.

What Does the NMEA Talker ID Mean?

The characters near the beginning of a conventional NMEA sentence commonly identify the talker or originating system. For example, a sentence beginning with $GPGGA contains the talker ID GP and the sentence formatter GGA.

Modern GNSS equipment may use different talker identifiers depending on which satellite constellation or combined GNSS solution generated the sentence. The checksum calculation itself does not change because the talker characters are simply part of the text being XORed.

What Is the NMEA Sentence Type?

After the talker identifier, the formatter identifies the purpose of the sentence. Common GPS and navigation logs contain message types such as GGA, RMC, GLL, VTG, GSA, and GSV.

GGA

Carries fix-related information such as position, fix quality, satellite count, HDOP, and altitude.

RMC

Provides minimum recommended navigation information including position, speed, course, and date.

GLL

Contains geographic position information including latitude and longitude.

VTG

Reports course over ground and ground speed information.

Why Does an NMEA Checksum Fail?

A failed checksum means the value calculated from the sentence content differs from the checksum transmitted after the asterisk. Several problems can cause this.

Modified Character

Changing even one character normally changes the XOR checksum.

Missing Character

A lost comma, digit, decimal point, direction letter, or other field character affects the calculation.

Serial Noise

Communication noise or framing problems can corrupt characters received from GNSS or marine equipment.

Incorrect Logging

Software may alter, truncate, or reconstruct the sentence incorrectly before saving it.

What If an NMEA Sentence Has No Checksum?

When the sentence contains no *XX checksum field, there is no transmitted checksum to compare against. The validator therefore calculates the checksum from the available message and reports that the original sentence has no checksum.

It also generates a corrected form by appending an asterisk and the calculated two-digit hexadecimal checksum.

A missing checksum and a failed checksum are different conditions. A missing checksum means no comparison is possible; a failed checksum means an attached checksum exists but does not match the calculated value.

NMEA Checksum for AIS Sentences

NMEA encapsulation sentences can begin with an exclamation mark rather than a dollar sign. A common example is AIS data beginning with identifiers such as !AIVDM.

The same checksum concept applies: XOR the characters after the start delimiter and before the asterisk. The validator accepts both $ and ! starting delimiters.

NMEA message structure documentation shows both conventional dollar-sign sentences and exclamation-mark encapsulation sentences. :contentReference[oaicite:4]{index=4}

NMEA Checksum vs CRC

The NMEA 0183 checksum is often casually called a CRC, but mathematically the standard NMEA sentence checksum is a simple 8-bit XOR checksum rather than a polynomial cyclic redundancy check such as CRC-16 or CRC-32.

That distinction matters when implementing a receiver. Applying a CRC polynomial algorithm to a normal NMEA 0183 sentence will not reproduce the two-digit checksum after the asterisk.

Common NMEA Checksum Validation Mistakes

Including the dollar sign

Do not XOR the initial $ character.

Including the asterisk

Stop the calculation immediately before *.

Including the checksum characters

The hexadecimal checksum text itself is not part of the XOR input.

Ignoring commas

Commas are actual characters in the sentence and are included in the calculation.

Changing capitalization

ASCII values differ between uppercase and lowercase letters, so capitalization can change the checksum.

Using a CRC algorithm

Standard NMEA 0183 sentence validation uses XOR, not CRC-16 or CRC-32.

Using the Validator for GPS and GNSS Debugging

Checksum validation is useful when debugging serial output from GPS/GNSS modules. If a receiver continually reports invalid checksums, the cause may be outside the positioning data itself.

Check the UART configuration, baud rate, grounding, voltage levels, cable quality, serial framing, buffering, and application code. A checksum error is often evidence that the exact text received by software differs from the text originally transmitted.

NMEA Checksum Validator FAQs

How is an NMEA checksum calculated?
Start with zero and XOR the ASCII value of every character between the initial $ or ! and the asterisk. Neither delimiter is included. The final 8-bit value is represented as two hexadecimal characters.
Does the dollar sign count in an NMEA checksum?
No. The starting dollar sign is excluded from the XOR calculation.
Does the asterisk count in the checksum?
No. The calculation stops immediately before the asterisk.
Are commas included in the NMEA checksum?
Yes. Commas between fields are ordinary characters for purposes of the XOR calculation and must be included.
Is the NMEA checksum a CRC?
Standard NMEA 0183 sentence checksums are XOR checksums, not polynomial CRC-16 or CRC-32 calculations.
What does *47 mean in an NMEA sentence?
The asterisk marks the checksum field and 47 is the hexadecimal checksum value.
Can an NMEA sentence have no checksum?
Some data sources may provide sentences without a checksum. In that case the validator can calculate the checksum, but there is no transmitted value to verify.
Does this validator accept AIS sentences?
Yes. Sentences beginning with an exclamation mark, such as AIS encapsulation sentences, can be validated using the same XOR checksum method.
What is a talker ID?
The talker ID is normally a two-character identifier near the beginning of an NMEA sentence that identifies the originating system or source.
What is an NMEA sentence formatter?
The formatter is normally a three-character code such as GGA, RMC, GLL, or VTG that identifies the sentence’s purpose.
Why does changing one character invalidate the checksum?
The checksum is calculated from every character in the data portion, so a different ASCII value changes the XOR result.
Can I paste a sentence with CR/LF line endings?
Yes. The validator removes common carriage-return and line-feed characters from the end of the pasted sentence before processing it.
Can this tool fix an incorrect NMEA checksum?
Yes. It calculates the correct checksum and displays a normalized sentence containing the calculated value.
Does validation prove the GPS data itself is correct?
No. A valid checksum indicates that the sentence is internally consistent with its checksum. It does not prove that the reported position, time, altitude, or other sensor values are physically correct.

Validate NMEA 0183 Checksums Instantly

Paste a GPS, GNSS, marine, or AIS NMEA sentence, compare its transmitted checksum with the calculated XOR value, inspect the message identifier, and generate a corrected sentence directly in your browser.

Scroll to Top