Code of Conduct Generator
Generate CODE_OF_CONDUCT.md files from popular templates. Customize pledge, standards, enforcement guidelines, and download ready-to-use markdown.
About This Tool
The Code of Conduct Generator is a free browser-based tool that creates CODE_OF_CONDUCT.md files from popular templates. Choose from Contributor Covenant 2.1 (the most widely adopted code of conduct for open source projects), Citizen Code of Conduct, Django Code of Conduct, or start from scratch with a fully custom template.
The generator provides a form-based editor for every section of your code of conduct: Our Pledge, Our Standards (positive and negative behaviors), Enforcement Responsibilities, Scope, Enforcement procedures, and Enforcement Guidelines with four severity levels (Correction, Warning, Temporary Ban, Permanent Ban). Fill in your project name, contact email, enforcement committee name, and community spaces to generate a complete, personalized document.
If you are setting up a new open source project, you may also want to generate a .gitignore file for your repository, create a changelog to track releases, or build a package.json for Node.js projects.
All processing runs entirely in your browser. No project names, email addresses, or document content is ever sent to any server. The generated markdown file follows the standard CODE_OF_CONDUCT.md format recognized by GitHub, GitLab, and other platforms.
How to Use
- Select a Template from the dropdown: Contributor Covenant 2.1, Citizen Code of Conduct, Django Code of Conduct, or Custom.
- Enter your Project Name and Contact Email for enforcement reports.
- Optionally specify an Enforcement Committee name and the Community Spaces where the code applies.
- Click the expandable sections to customize Our Pledge, Our Standards, Enforcement Responsibilities, Scope, Enforcement, and Enforcement Guidelines.
- Review the generated markdown in the output panel on the right. Toggle Preview to see a rendered view.
- Click Copy or press Ctrl+Shift+C to copy the markdown to your clipboard.
- Click Download .md to save the file as CODE_OF_CONDUCT.md, ready to commit to your repository.
Popular Code of Conduct Examples
FAQ
Which template should I use?
The Contributor Covenant 2.1 is the most widely adopted code of conduct for open source projects, used by over 100,000 communities including Kubernetes, Rails, and Swift. It is the recommended starting point for most projects. The Citizen Code of Conduct and Django Code of Conduct are good alternatives if you prefer their phrasing. Use Custom if you want to write everything from scratch.
Can I customize the templates?
Yes. After selecting a template, every section is editable. Click any of the expandable sections (Our Pledge, Standards, Enforcement, etc.) to modify the text. Your changes are reflected in the generated output immediately.
Where should I put the CODE_OF_CONDUCT.md file?
Place it in the root of your repository. GitHub automatically detects CODE_OF_CONDUCT.md in the root, docs/, or .github/ directories and displays a link to it in the repository sidebar and when users open new issues.
What are the enforcement guideline levels?
The four levels are: 1) Correction — for minor first offenses, resulting in a private warning; 2) Warning — for a single incident or pattern, with consequences for continued behavior; 3) Temporary Ban — for serious violations, with a time-limited ban from community interaction; 4) Permanent Ban — for sustained patterns of violation, resulting in permanent removal from the community.
Do I need a contact email?
Yes, a contact email is essential so community members can report violations confidentially. You can use a dedicated email like conduct@yourproject.org, a personal email of a trusted maintainer, or a team alias. Without a contact method, your code of conduct cannot be enforced.
Is my data safe?
Yes. All text generation runs entirely in your browser using JavaScript. No project names, email addresses, or document content is ever sent to any server. You can verify this by checking the Network tab in your browser's developer tools while using the tool.
Can I use this for non-open-source projects?
Absolutely. While codes of conduct originated in open source communities, they are equally valuable for internal teams, conferences, meetups, online communities, and corporate projects. Adjust the community spaces and enforcement sections to fit your context.
Related Tools
README Generator
Generate professional README.md files from a simple form. Choose templates, add badges, sections, and download instantly.
.gitignore Generator
Generate .gitignore files by selecting languages, frameworks, and IDEs. Combine multiple templates instantly.
Changelog Generator
Generate CHANGELOG.md from Conventional Commits. Group by type, add version headers, and export in Keep a Changelog format.
Package.json Generator
Generate package.json files with a visual form. Set name, version, scripts, dependencies, and other fields with validation.
Git Commit Message Generator
Generate Conventional Commits messages with a visual form. Select type, scope, description, body, and breaking changes.
.gitattributes Generator
Generate .gitattributes files for line ending normalization, binary file handling, and diff/merge settings.
CONTRIBUTING.md Generator
Generate professional CONTRIBUTING.md files for open source projects with templates for contribution types, commit formats, and PR processes.
License Identifier
Identify open source licenses from pasted text, compare permissions and conditions, and generate license files with your details.