cagecodelookupBlog
Card noting that every CAGE and NCAGE code is 5 characters long, and that 794,847 current SAM.gov registrations carry one in the shared code fieldFormat

The CAGE Code Format: Why First and Last Characters Are Digits

If you are holding a code and trying to tell whether it was transcribed correctly, this is the rule to check it against — and the real exceptions to know before you assume a mismatch means a typo.

Updated 8 min read

A CAGE code is five characters long, mixing letters and numbers, and the version issued inside the United States follows one consistent convention: the first and last characters are digits, and the letters I and O never appear anywhere in the code. That convention is about avoiding transcription errors, not about encoding information — and it is a convention rather than a strict universal rule, because codes issued outside the United States are allowed to break it. Here is what each part of that format actually means, why it exists, and where it stops applying.

The CAGE code format, in one sentence

A CAGE code is always exactly five characters, and a domestic U.S. code follows a specific pattern on top of that: a digit in the first position, a digit in the last position, and any mix of letters or digits (excluding I and O) in the three positions between them. That single sentence answers "how many digits," "how many characters," and "which characters" at once — the rest of this guide is about why each part of the rule exists and when it does not apply.

Why a CAGE code is five characters

Five characters is simply the fixed field width the Defense Logistics Agency's CAGE Program Office built the system around — it is not five because of anything meaningful about the number five, the same way a Social Security number is nine digits because that is the field size the system was designed with, not because nine carries significance. A CAGE code is not getting longer or shorter as the registered-entity pool grows; the field has stayed five characters since the system was established, and current defense logistics data standards still define it as a fixed five-position field.

That fixed width is also why a code is never padded or abbreviated. A code that looks shorter because leading content was trimmed, or longer because an extra character got appended during a copy-paste, is not a format variant — it is a transcription error, and the fix is to go back to the original document and copy the full five characters again.

Why the first and last characters are usually digits

For a code assigned inside the United States, the first and last characters are digits, and the three characters between them can be any mix of letters and digits. That structure gives a reader a fast, reliable way to sanity-check a code at a glance: if either end is a letter, something is off for a domestic code specifically, before anyone even runs a lookup.

The convention exists for consistency and machine-readability, not because the first or last digit means anything about the entity. It does not indicate a region, an industry, or a registration year, and it is not derived from the company's name. It is simply the fixed shape that domestic codes have followed.

Why the letters I and O never appear

A domestic CAGE code never uses the letters I or O, for a specific, practical reason: both are easy to misread as the digits 1 and 0, especially in printed documents, stamped parts, or a typed form field without a monospaced font. Removing both letters from the character set entirely means there is never a case where a human has to guess whether a given glyph in a code is a letter or a digit — if it could be read either way, it simply is not used.

This is the single most useful fact for anyone transcribing a code by hand or from a scanned document: if a character looks like it could be an I or a 1, or an O or a 0, the digit reading is the one that is actually possible in a domestic code, because the letter was never a valid option to begin with.

What the format does not tell you

None of the format rules above encode information about the entity that holds the code. CAGE codes are assigned sequentially from the pool of available codes as requests come in through SAM.gov registration or a direct request to DLA's CAGE Program Office — not generated from the entity's name, state, industry, or founding date. Two facilities on opposite sides of the country, in completely unrelated industries, can be assigned codes that differ by a single character purely because their requests happened to process close together in time.

Treating any single character, or the code as a whole, as a decoder for something about the company is a documented mistake on sites that write about CAGE codes, and it will produce a wrong answer every time someone tries it. If you need information about what a code's holder actually is — its registration status, its primary industry classification, or whether it carries a federal exclusion flag — that comes from looking the code up directly, not from reading the characters themselves.

Why some real codes break the U.S. pattern

The first-and-last-digit, no-I-or-O rule is specifically the United States convention. An NCAGE code — the equivalent identifier issued to an entity outside the United States, through that country's national codification bureau or through NATO's support agency — is still exactly five characters, but it is not bound by the same positional rule. A code that starts or ends with a letter is not necessarily a mistyped domestic code; it may simply be a valid NCAGE code issued under a different country's convention. The current SAM.gov extract behind this site's lookup tool holds 794,847 registrations carrying a code in that shared CAGE/NCAGE field, spanning both the domestic pattern and the conventions used elsewhere.

Even the letter exclusion is not absolute once international codes are in scope. NATO's own codification documentation notes that the letter I is specifically reserved for the first position of certain international NCAGE codes assigned directly by NATO's support agency — the opposite of the domestic rule, where I never appears at all. That is not a contradiction; it is two different issuing authorities running two different conventions inside the same five-character format.

It is also worth knowing that the domestic rule itself has not been stated identically in every version of DLA's own procedures documentation over the years — an earlier published version described a requirement for a letter in the first or last position, while a later version described the digit-first-and-last requirement that matches current guides and this site's own lookup tool. That history is itself a reason to treat the first/last-digit rule as the current, well-supported convention rather than as a guarantee that can never have an exception, now or in the historical record.

How to check a code's format with confidence

The most reliable way to confirm a code is correctly transcribed is not to hand-check it against the positional rule — it is to run it through a CAGE code lookup and see whether it resolves to an active registration. The format rule is a useful first filter for catching an obvious transcription error on a domestic code, but it cannot confirm a code is correct on its own, and it will incorrectly flag a perfectly valid NCAGE code as wrong if applied too strictly.

Case is not something to worry about when checking a code: CAGE and NCAGE codes are conventionally written in uppercase, but a lookup tool built for this data treats the characters as case-insensitive, so typing a code in lowercase or mixed case should not change the result. What does matter is getting the exact five characters right — no added dashes, no extra spaces, and no characters dropped from either end.

Common transcription mistakes

The most frequent mistake is the I/1 or O/0 substitution described above — typing a 1 as a letter I, or a 0 as a letter O, because the source document's font made them look identical. The second most common mistake is applying the domestic digit-first-and-last rule to a code that is actually an NCAGE code, and assuming a letter at either end means the code was copied wrong, when it may simply be a valid international code.

A third mistake is adding formatting that was never part of the code itself — a hyphen, a space, or a prefix copied along with the code from a document's layout rather than from the code itself. A CAGE code has no internal punctuation; if a copied string includes a dash or a space, that character was added by whatever document or system it was copied from, not by DLA. Stripping anything that is not a letter or a digit, then checking that exactly five characters remain, resolves the great majority of transcription problems before a lookup is ever run.

Frequently asked questions

How many characters are in a CAGE code?

Exactly five, always. A CAGE code is a fixed-width field — it is never shorter or longer, and it mixes letters and numbers rather than using one or the other exclusively.

Are the first and last characters of a CAGE code always numbers?

For a domestic U.S.-issued code, yes, by convention: the first and last characters are digits, and the three in between can be letters or digits. An NCAGE code issued to an entity outside the United States follows a different convention and is not bound by that same rule, so it can start or end with a letter.

Why do CAGE codes never use the letters I or O?

Because both letters are easily confused with the digits 1 and 0, especially on printed parts, stamped labels, or scanned documents. Removing them from the character set means there is never a case where a human has to guess whether a given character is a letter or a digit.

Does the format of a CAGE code reveal anything about the company that holds it, like its state or industry?

No. CAGE codes are assigned sequentially from the available pool as registration requests are processed, not generated from the entity's name, location, or industry. Reading meaning into specific characters is a documented mistake, and the only way to learn anything real about the holder is to look the code up directly.

Can a real CAGE or NCAGE code have letters at the start or end?

Yes, if it is an NCAGE code issued outside the United States. Those codes share the same five-character format but follow a different country-level convention, so a letter at the first or last position does not necessarily mean the code was mistyped.

Is a CAGE code case-sensitive when I look it up?

Codes are conventionally written in uppercase, but a lookup tool built for this data treats the characters as case-insensitive, so entering a code in lowercase or mixed case should return the same result as entering it in uppercase.

What should I do if a code doesn't match the typical digit-first, digit-last pattern?

Do not assume it is invalid. It may be a valid NCAGE code issued under a non-U.S. convention. The reliable way to confirm either way is to run the code through a lookup and check whether it resolves to an active registration, rather than rejecting it on format alone.

Sources