RFC 2119 Keyword Checker
Paste a requirements or test specification and the checker highlights the requirement keywords defined by RFC 2119 and RFC 8174 (MUST, MUST NOT, SHOULD, SHOULD NOT, MAY and the rest), counts them, and flags wording that weakens the requirement level.
About this tool
RFC 2119 defines the exact meaning of words such as MUST, SHOULD and MAY in specifications, and RFC 8174 clarifies that they carry that meaning only when written in capital letters. This checker finds those keywords in your text, highlights them, counts how often each one is used and on which lines, and warns about lowercase look-alikes and vague phrases such as “if possible” or “ought to”.
The check runs entirely in your browser. The text you paste is never sent to a server, so it is safe to use with unpublished specifications.
How it works
- Keywords detected (capitals only): MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY and OPTIONAL. Multi-word keywords match across a line break or extra spaces, and a word inside another word (for example MUSTARD) is never matched.
- Colors: red for absolute requirements and prohibitions, yellow for recommendations, blue for optional items. Counts and the line numbers where each keyword appears are listed under the highlighted text.
- Lowercase look-alikes: must, should, may, shall, required, recommended and optional written without capitals (or in mixed case such as “Must”) are counted and listed by line. Under RFC 8174 they are ordinary English, not requirement keywords. That is fine if it is what you meant, and worth fixing if you intended a requirement.
- Vague phrases that do not map to a requirement level are flagged: ought to, would be nice, nice to have, preferably, if possible, where possible, as far as possible, as appropriate, is expected to, is supposed to and and/or.
- Copy summary copies the counts as plain text, ready to paste into a review record.
- The checker does not judge whether a requirement is correct, testable or consistent with the rest of the document. It only checks the keywords and phrases listed above.
FAQ
Q. Do I have to capitalize the keywords?
A. Only if you want them to carry the RFC 2119 meaning. RFC 8174 says the words have that special meaning only in all capitals, so a lowercase “must” is just English. Many specifications also include a sentence stating that they use the keywords as described in BCP 14 (RFC 2119 and RFC 8174).
Q. Why is “MAY NOT” not listed?
A. RFC 2119 does not define it, and it is ambiguous (not allowed, or optional not to). Use MUST NOT for a prohibition and MAY for something optional.
Q. Is MUST the same as SHALL?
A. In RFC 2119 they are synonyms, as are MUST NOT and SHALL NOT, SHOULD and RECOMMENDED, and MAY and OPTIONAL. Pick one form per document and use it consistently.