> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/standards/managing-quality-profiles/creating-a-quality-profile.md).

# Creating a quality profile

Create custom quality profiles in SonarQube Cloud: general profiles you can apply to all or multiple languages, or language-specific profiles for one language.

*This feature is only available in the Team and Enterprise plans. See* [Subscription plans](/sonarqube-cloud/administering-sonarcloud/managing-subscription/subscription-plans.md) *for more information.*

Sonar way core, the default built-in profile, is intended as a starting point. In many cases, you will want to adjust your quality profile later. See [Built-in quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/built-in-quality-profiles.md) if you want a stricter starting point instead, such as Sonar way extended or Sonar way comprehensive.

If you have multiple projects, you might also need to have different profiles for each. You might run into the following situations:

* You have different technical requirements from one project to another.
* You want to ensure stronger requirements for some of your projects than for others.

To create a quality profile, you need the Administer Quality Profiles permission. You create and manage quality profiles at the organization level. At the project level, you can only assign them. You can:

* Create a general profile, which you can apply to all or multiple languages at once.
* Extend an existing language-specific quality profile (duplicate an existing profile with inheritance).
* Copy an existing language-specific quality profile (duplicate an existing profile without inheritance).
* Create a language-specific quality profile from scratch.
* Import a quality profile from another SonarQube instance.

See [Understanding quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/understanding-quality-profiles.md#profile-types) to choose between general and language-specific profiles.

We highly recommend that your custom profiles inherit from a built-in Sonar way profile. Custom general profiles always inherit from Sonar way comprehensive. For language-specific profiles, extend a built-in profile. This allows you to manage most use cases. Indeed, if your profiles inherit from a built-in profile, you’ll automatically benefit from:

* Newly implemented rules.
* Changes in a rule’s configuration.
* The deactivation of deprecated rules.

## Creating a general profile <a href="#creating-a-profile-for-all-languages" id="creating-a-profile-for-all-languages"></a>

Instead of activating rules one by one, you select the security standards the profile must cover and set a rule activation threshold for each software quality.

1. Go to *Your organization* > **Policies** > **Quality profiles**. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) to access your organization.

<figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-a122b0fdc54a8326b9df261b1e3abcbb35423310%2Fsonarqube-cloud-quality-profile-create-profile.png?alt=media" alt="The organization Quality profiles page on the General tab, with the Create new profile button in the top right corner"><figcaption></figcaption></figure>

2. Select **Create new profile**. The **Create a quality profile** dialog opens.
3. In **Name**, enter the name of the new quality profile.
4. In **Type**, select **General profile**.

<div align="left"><figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-81d36cb5dfc067bfaab3e72b8639de0f45db3b1e%2Fsonarqube-cloud-quality-profile-create-general.png?alt=media" alt="Step 1 of the Create a quality profile dialog with General profile selected and a note that the parent is always Sonar way comprehensive"><figcaption></figcaption></figure></div>

5. In **Parent profile**, a message confirms that the profile inherits from Sonar way comprehensive. You cannot change the parent of a general profile.
6. Select **Next**.
7. Optionally, select the security standards that the profile must cover. Then select **Next**.
8. In **Rule thresholds**, use the sliders to set the rule activation threshold for **Security**, **Reliability**, and **Maintainability**:
   * Each slider goes from **None**, which activates no rules for that software quality, to **Info**, which activates rules of all severities. To exclude a software quality completely, set its slider to **None**.
   * The percentage next to each software quality shows the approximate share of its rules that are active.
   * By default, the sliders match Sonar way core: **Info** for Security, **Medium** for Reliability, and **Blocker** for Maintainability.
   * Rules mapped to the security standards you selected in the previous step stay active even if the thresholds would otherwise exclude them.
9. Select **Create**. The profile is listed under **All** on the **General** tab.

To change the security standards or the thresholds later, see [Editing a quality profile](/sonarqube-cloud/standards/managing-quality-profiles/editing-a-custom-quality-profile.md).

## Extending a quality profile <a href="#extending-a-quality-profile" id="extending-a-quality-profile"></a>

When you extend a language-specific profile, you create a child profile that inherits all the *activated* rules in the parent profile. You can then activate additional rules in the child, beyond those that are inherited. You can also deactivate rules that are activated in the parent.

For more information about inheritance, check out the [Understanding quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/understanding-quality-profiles.md) page.

### By using the Create new profile button <a href="#by-using-the-create-button" id="by-using-the-create-button"></a>

1. Go to *Your organization* > **Policies** > **Quality profiles**. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) to access your organization.
2. Select **Create new profile**. The **Create a quality profile** dialog opens.
3. In **Name**, enter the name of the new quality profile.

<div align="left"><figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-5fad582780f16ae05f524cbf263db932f00f72b7%2Fsonarqube-cloud-quality-profile-create-specific.png?alt=media" alt="The Create a quality profile dialog with Language-specific selected, ABAP as the language, and Sonar way comprehensive as the parent profile"><figcaption></figcaption></figure></div>

4. In **Type**, keep **Language-specific**, which is selected by default.
5. In **Language**, select the language of the new quality profile.
6. In **Parent profile**, select the quality profile you want to extend.
7. Select **Create**. The details page of the new profile opens.

To change the created profile, see [Editing a quality profile](/sonarqube-cloud/standards/managing-quality-profiles/editing-a-custom-quality-profile.md).

### From the parent profile’s menu <a href="#from-the-parent-profiles-menu" id="from-the-parent-profiles-menu"></a>

1. See the [Viewing quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/viewing-quality-profiles.md) page to learn how to select the quality profile that you want to extend.
2. Click the action menu and select **Extend**. The **Extend Profile** dialog opens.
3. In **New name**, enter the name of the new quality profile.
4. Select **Extend**.

To change the created profile, see [Editing a quality profile](/sonarqube-cloud/standards/managing-quality-profiles/editing-a-custom-quality-profile.md).

## Copying a quality profile <a href="#copying-a-quality-profile" id="copying-a-quality-profile"></a>

1. See the [Viewing quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/viewing-quality-profiles.md) page to learn how to select the quality profile that you want to copy.
2. Click the action menu and select **Copy**. The **Copy Profile** dialog opens.
3. In **Name**, enter the name of the new quality profile.
4. Select **Copy**.

To change the created profile, see the instructions on the [Editing a quality profile](/sonarqube-cloud/standards/managing-quality-profiles/editing-a-custom-quality-profile.md) page.

## Creating a quality profile from scratch <a href="#creating-a-quality-profile-from-scratch" id="creating-a-quality-profile-from-scratch"></a>

1. Go to *Your organization* > **Policies** > **Quality profiles**. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) to access your organization.
2. Select **Create new profile**. The **Create a quality profile** dialog opens.
3. In **Name**, enter the name of the new quality profile.
4. In **Type**, keep **Language-specific**, which is selected by default.
5. In **Language**, select the language of the new quality profile.
6. In **Parent profile**, select **None**.
7. Select **Create**. The details page of the new profile opens.

To change the created profile, see the instructions on the [Editing a quality profile](/sonarqube-cloud/standards/managing-quality-profiles/editing-a-custom-quality-profile.md) page.

## Importing a quality profile from another SonarQube instance <a href="#importing-quality-profile-from-another-instance" id="importing-quality-profile-from-another-instance"></a>

You can export a custom quality profile to an XML file and import it from another SonarQube instance. SonarQube Server, Cloud, and SonarQube Community Build support this feature.

When you import the quality profile:

* If a quality profile with an identical name already exists, it will be updated. The update process involves adding any active rules from the backup that were not active in the existing profile. Existing active rules will not be updated.
* Otherwise, a new profile is created.

Any user can export a quality profile. You need the Administer Quality Profiles permission to import a quality profile.

To export a custom quality profile:

1. Go to *Your organization* > **Policies** > **Quality profiles** and select the **Language-specific** tab. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) to access your organization.
2. Locate the quality profile’s row and select the action menu on the right side of the row.
3. Select **Back up** in the menu.

To import a backed up quality profile:

1. Go to *Your organization* > **Policies** > **Quality profiles** and select the **Language-specific** tab. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) to access your organization.
2. Select **Restore**. The **Restore File** dialog opens.
3. Select **Choose File** and find your XML file.
4. Select **Restore**.

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Built-in quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/built-in-quality-profiles.md)
* [Understanding quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/understanding-quality-profiles.md)
* [Viewing quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/viewing-quality-profiles.md)
* [Editing a quality profile](/sonarqube-cloud/standards/managing-quality-profiles/editing-a-custom-quality-profile.md)
* [Associating with projects](/sonarqube-cloud/standards/managing-quality-profiles/associating-a-quality-profile-with-projects.md)
* [Changing default quality profile](/sonarqube-cloud/standards/managing-quality-profiles/changing-default-quality-profile.md)
* [Maintaining quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/maintaining-your-custom-quality-profiles.md)
* [Granting permissions to users](/sonarqube-cloud/standards/managing-quality-profiles/authorizing-other-users-to-manage-quality-profile.md)
* [Quality profile](/sonarqube-cloud/managing-your-projects/project-analysis/quality-profile-association.md)
* [Quality profiles for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-profiles-for-agentic-ai.md)

## Related online learning

* <i class="fa-video">:video:</i> [Administering quality profiles in SonarQube](https://www.sonarsource.com/learn/course/core-concepts/99c287ee-6671-471d-b6ff-4ec88be61383/administering-quality-profiles-in-sonarqube)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-cloud/standards/managing-quality-profiles/creating-a-quality-profile.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
