Use Code of Conduct Generator

Enter your data below to use the Code of Conduct Generator

📌 Try these examples:
RESULT

Last updated

Why Every Open Source Project Needs a Code of Conduct

A Code of Conduct (CoC) sets clear expectations for behavior in your project's community — issues, pull requests, discussions, and events. It signals that your project is welcoming to contributors from all backgrounds and gives maintainers a documented basis for handling violations. GitHub, GitLab, and most major open source foundations recommend including one.

The most widely adopted template is the Contributor Covenant, used by over 40,000 open source projects including Linux, Rails, Angular, and Vue.js.

Contributor Covenant v2.1 Structure

Adding a CoC to Your Repository

Shell
# GitHub automatically detects CODE_OF_CONDUCT.md
# Place it in the root, docs/, or .github/ directory

# Download the Contributor Covenant
curl -o CODE_OF_CONDUCT.md   https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md

# Replace the contact placeholder
sed -i 's/\[INSERT CONTACT METHOD\]/conduct@yourproject.org/' CODE_OF_CONDUCT.md

Enforcement Best Practices

A CoC is only effective if violations are actually addressed. Define a clear enforcement process: who receives reports (ideally a dedicated email, not a personal address), how quickly you respond (24–72 hours is standard), and what the escalating consequences are (warning, temporary ban, permanent ban). Document this in a separate ENFORCEMENT.md or in the CoC itself.

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.