Patterns: Create a user profile

Sex

Help users select their sex.

This helps users to provide sex information.

About this pattern

Services collect sex information as part of a user profile, to match documents for identity proofing purposes, and to provide biological information in a clinical context.

By Executive Order, “it is the policy of the United States to recognize two sexes, male and female […] ‘Sex’ is not a synonym for and does not include the concept of ‘gender identity.’ […] When administering or enforcing sex-based distinctions, every agency and all Federal employees acting on an official capacity on behalf of their agency shall use the term ‘sex’ and not ‘gender’ in all applicable Federal policies and documents.”

Some states have policies that differ, which may be reflected on state identity documents.

When to use this pattern

Follow this pattern when you need to ask for a user’s sex as a part of your service. Only ask for sex if you need that information.

What’s the solution?

Understand why you are collecting this information. When asking for sex information, include only “Male” and “Female” as options.

Guidance

What to do

  • Do determine if you need to collect sex data.
  • Do understand that collecting sex information for identity proofing purposes may be complicated by state identity document approaches.
  • Do provide helper text that explains why you are asking for this data and who it will be shared with.
  • Do provide a controlled vocabulary when collecting sex data (Male and Female)
  • Do use fieldset and legend to group related radio buttons together, and clear labels and attributes on these form elements.

What not to do

  • Do not use the word "gender" when you are asking for sex data.
  • Do not include “prefer not to answer.” If you are considering adding this option, then consider whether the question is needed at all.
  • Do not include X as an option when collecting sex data.

Sex Please select your sex from the follwing options. Why do we ask for sex information?

Why do we ask for [type] information?

Include a description of why your service collects [type] information and how this data will be shared.

<form class="usa-form usa-form--large">
  <fieldset class="usa-fieldset">
    <legend class="usa-legend">Sex</legend>
    <span class="usa-hint" id="slabHint">Please select your sex from the follwing options. <a href="#sex-data-transparency-statement" aria-controls="sex-data-transparency-statement" data-open-modal>Why do we ask for sex information?</a></span>
    <div class="usa-radio">
      <input class="usa-radio__input" id="input-male" type="radio" name="sex" value="male" />
      <label class="usa-radio__label" for="input-male">Male</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="input-female" type="radio" name="sex" value="female" />
      <label class="usa-radio__label" for="input-female">Female</label>
    </div>
  </fieldset>
</form>

<div
class="usa-modal"
id="sex-data-transparency-statement"
aria-labelledby="sex-data-transparency-statement-heading"
aria-describedby="sex-data-transparency-statement-description"
>
  <div class="usa-modal__content">
    <div class="usa-modal__main">
      <h4 class="usa-modal__heading" id="sex-data-transparency-statement-heading">
        Why do we ask for [type] information?
      </h4>
      <div class="usa-prose">
        <p id="sex-data-transparency-statement-description">
          Include a description of why your service collects [type] information and how this data will be shared.
        </p>
      </div>
      <div class="usa-modal__footer">
        <button type="button" class="usa-button" data-close-modal>
          Return to the form
        </button>
      </div>
    </div>
    <button
      type="button"
      class="usa-button usa-modal__close"
      aria-label="Close this window"
      data-close-modal
    >
      <svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
        <use href="/assets/img/sprite.svg#close"></use>
      </svg>
    </button>
  </div>
</div>
<form class="usa-form usa-form--large">
  <fieldset class="usa-fieldset">
    <legend class="usa-legend">Sex</legend>
    <span class="usa-hint" id="slabHint">Please select your sex from the follwing options. <a href="#sex-data-transparency-statement" aria-controls="sex-data-transparency-statement" data-open-modal>Why do we ask for sex information?</a></span>
    <div class="usa-radio">
      <input class="usa-radio__input" id="input-male" type="radio" name="sex" value="male" />
      <label class="usa-radio__label" for="input-male">Male</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="input-female" type="radio" name="sex" value="female" />
      <label class="usa-radio__label" for="input-female">Female</label>
    </div>
  </fieldset>
</form>

<div
class="usa-modal"
id="sex-data-transparency-statement"
aria-labelledby="sex-data-transparency-statement-heading"
aria-describedby="sex-data-transparency-statement-description"
>
  <div class="usa-modal__content">
    <div class="usa-modal__main">
      <h4 class="usa-modal__heading" id="sex-data-transparency-statement-heading">
        Why do we ask for [type] information?
      </h4>
      <div class="usa-prose">
        <p id="sex-data-transparency-statement-description">
          Include a description of why your service collects [type] information and how this data will be shared.
        </p>
      </div>
      <div class="usa-modal__footer">
        <button type="button" class="usa-button" data-close-modal>
          Return to the form
        </button>
      </div>
    </div>
    <button
      type="button"
      class="usa-button usa-modal__close"
      aria-label="Close this window"
      data-close-modal
    >
      <svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
        <use href="/assets/img/sprite.svg#close"></use>
      </svg>
    </button>
  </div>
</div>

Considerations

  • Confirm you need this information. As with all personal information, consider whether you need to collect it at all. Clearly explain the reason for asking for the information and what will be done to secure the user’s privacy and safety.
  • Make sure the data you collect match what’s required by your system. Be aware that for identity proofing, especially when integrating state information, there may be data that differs from the federal requirements.

Accessibility

References

Disclaimer

Links to nongovernment sources are made for educational or source citation purposes only, and do not represent an endorsement of the organizations by the General Services Administration. The General Services Administration does not assume any responsibility for the content, operation, or policies of other entities’ websites.

Latest updates

Meaningful code and guidance updates are listed in the following table:

Date USWDS version Affects Breaking Description
2025-02-11 N/A
  • Guidance
No

Updated references. Updated references to refer only to guidance related to the January 20, 2025 Executive Order, "Defending Women from Gender Ideology Extremism And Restoring Biological Truth To The Federal Government". More information: uswds-site#3099

2025-02-11 N/A
  • Guidance
Breaking

Breaking Updated sex pattern to include only options for "Male" and "Female". Updated content related to the January 20, 2025 Executive Order, "Defending Women from Gender Ideology Extremism And Restoring Biological Truth To The Federal Government". More information: uswds-site#3099

2025-02-11 N/A
  • Guidance
Breaking

Breaking Removed gender identity pattern. Removed content related to the January 20, 2025 Executive Order, "Defending Women from Gender Ideology Extremism And Restoring Biological Truth To The Federal Government". More information: uswds-site#3099

2025-02-10 N/A
No

Replaced dead hyperlinks with archived copy. Replaced references to fcsm.gov with plain text and a link to the archived page on archive.org. More information: uswds-site#3092

2025-01-30 N/A
  • Guidance
No

Added content alert. This pattern is affected by a recent change in law, policy, or regulation. Expect changes to this pattern in the near future as we adapt to these new requirements. More information: uswds-site#3090

2025-01-22 N/A
  • Guidance
No

Updated the urls for broken links. Replaced the urls for “Executive Order 14075”, “Recommendations on the best practices for the collection of sexual orientation and gender identity data on federal statistical surveys”, and “X gender marker available on U.S. Passports starting April 11” links. More information: uswds-site#3068

2023-03-09 N/A
  • Guidance
No

Added new White House report. Added new White House report on collection of Sexual Orientation and Gender Identity (SOGI) information for statistical purposes. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Added information on how some states collect sex data. Added information and a reference link for how some states collect sex data on birth certificates and other legal documents. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Added more detail supporting specific use cases for collecting sex data. Added more detail about the most common use cases — matching an original birth certificate (“Sex listed at birth”) or matching current legal documents (“Legal sex”). More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Added Sex pattern safety and transparency guidance. Added additional guidance to promote using tested translations on multilingual forms, and providing helper text to explain data usage and sharing. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated usage of “gender identity” and “sex” to be more consistent throughout. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated usage for “sex listed at birth.” Updated our use of “sex listed at birth” to refer to original birth certificate information specifically. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated description of documented pattern use cases. Updated our background section to focus on documented use cases for collecting gender identity and sex data. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated information on Form DS-11. Added more detail about how the Department of State collects gender information on Form DS-11 and displays this information on passports. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated Sex pattern preview. Show the most common use cases of matching documents — either an original birth certificate (“Sex listed at birth”) or current legal documents (“Legal sex”) — and include explanation of why and how the data is used in the hint text. More information: uswds-site#1994

2022-11-14 3.3.0
  • Guidance
No

Pattern published.