Code of Conduct Generator
A complete CODE_OF_CONDUCT.md — placeholders audited before export
Document setup
Template + fields → MarkdownMarkdown preview
No document yetFill in the fields and generate a document
Preview updates when you press Generate.
Examples
Open-source repository
Covenant base · My Project · conduct@example.com · scope: repo · all optional sectionsA full CODE_OF_CONDUCT.md with pledge, standards, scope, enforcement ladder and CC BY 4.0 attributionThe default setup covers the repository setup checklist in one pass.
Event community
Covenant base · DevConf · https://example.org/report · scope: events · team: Code of Conduct TeamEvent-scoped policy with a report link and a named enforcement teamURL contacts are valid; wording adapts to 'report via' style links.
Chat server
Plain base · Café Chat · mods@example.org · scope: chat · optional sections offShort plain-language document mentioning official chat channels and direct messagesThe plain base keeps a small community policy readable without orphan headers.
About this tool
The Code of Conduct Generator assembles a complete CODE_OF_CONDUCT.md from two structured bases: an adapted Contributor Covenant v2.1 template and an original plain-language community template. Fields — project name, enforcement contact, optional team and scope — are interpolated into the sections; nothing is fetched and nothing is stored.
The tool's central guard is a placeholder audit. After assembly it scans the document for unfilled {{token}} markers; if any remain, export is disabled and the missing fields are listed. A missing enforcement contact — the classic reason a Code of Conduct is decorative rather than actionable — cannot slip through a Copy or Download action.
Optional sections are real switches, not comment blocks: enforcement ladder, response-time commitment, appeal process and reporter confidentiality can be included or omitted, and omitted sections leave no orphan headings. The scope control changes wording for repository-only, repository-plus-events, and repository-plus-chat communities.
For the Covenant base the CC BY 4.0 attribution block is appended automatically and cannot be switched off. The generated text is community policy, not legal advice; a Code of Conduct is not a terms-of-service or privacy policy.
What this tool does not do
- Generated text is community policy, not legal advice; this tool does not produce terms of service or privacy policies.
- English only — translation of the bundled templates is out of scope.
- The preview is a styled Markdown passthrough, not a byte-for-byte GitHub renderer; use the raw preview before committing.
- The Contributor Covenant attribution is mandatory and cannot be disabled in the Covenant template.
How to use this tool
Pick a base
Choose Contributor Covenant v2.1 (adapted, attribution included) or the shorter plain-language community base.
Fill the required fields
Enter the project or community name and an enforcement e-mail address or report URL; optionally add a team name and choose a scope.
Configure optional sections
Toggle the enforcement ladder, response-time commitment, appeal process and confidentiality note, and set the response-time hours.
Generate and export
Press Generate, review the Markdown preview, then Copy or download the exact file name CODE_OF_CONDUCT.md. The README snippet is copy-ready too.
Use cases
Repository setup
Complete an open-source checklist with a single, consistently filled policy file rather than hand-editing a raw template.
Organization-wide standard
Start every repo from the same base and contact, then adjust only the scope and team fields.
Community spaces
Produce a short, readable policy for a Discord or Slack community using the plain-language base and chat scope.
What the generator emits
| Output | Contents |
|---|---|
| CODE_OF_CONDUCT.md | Full Markdown body with heading, sections, date stamp and (for Covenant) attribution — no frontmatter. |
| README badge | Shields.io badge linking to CODE_OF_CONDUCT.md. |
| README mention | A paragraph pointing participants to the policy and its reporting contact. |
| Enforcement ladder | Correction → warning → temporary ban → permanent ban, each with a one-line criterion. |
| Placeholder audit | List of unfilled {{token}} names; export is blocked until it is empty. |
The Markdown preview is approximate; GitHub and other renderers may style headings and links slightly differently.
Common mistakes
Mistake:Leaving a raw {{contact}} placeholder in a committed template.
Fix:Use this generator: the placeholder audit blocks Copy and Download until every token is filled.
Mistake:Publishing a Code of Conduct with no reporting path.
Fix:Enter a monitored e-mail address or an issue-form URL in the enforcement contact field.
Mistake:Treating a Code of Conduct as a legal document.
Fix:A CoC is community policy. For legal enforceability, terms of service, or privacy obligations, consult counsel and use the appropriate legal templates.
Frequently asked questions
Is Contributor Covenant the right template?
Contributor Covenant v2.1 is the most widely adopted Code of Conduct for open-source projects and is a safe default for repositories and events. Choose the plain-language base when your audience is a chat community or you want a shorter policy that is easy to read on a phone. Both bases generate the same file name and the same enforcement-contact validation; the Covenant version always carries its CC BY 4.0 attribution.
What makes a Code of Conduct enforceable?
A named enforcement contact, a clear scope and an explicit process. This tool requires a valid e-mail address or report URL before it allows export, and it can include a response-time commitment, an escalation ladder, an appeal path and a reporter-confidentiality note. Use a contact that is actually monitored, and make sure your maintainers are willing to follow the process they publish.
Where should the file live?
Commit it as CODE_OF_CONDUCT.md at the repository root (or in the .github folder if your organization standardizes there). GitHub, GitLab and most forges detect the file automatically and surface it in the community panel. The generated README snippet links to the root-level file name, so keep the name unchanged when you move it.
Do I need a separate reporting email?
Not necessarily — an issue-form URL or a dedicated channel can be the enforcement contact, as long as reports are private. A public issue is usually a bad reporting path for sensitive incidents, so prefer a monitored e-mail address or a private form. The tool accepts both formats and adapts the wording to the contact you provide.
Is a Code of Conduct legally binding?
A Code of Conduct is community policy, not a contract or legal advice. It describes expected behavior and the process your community will follow; it is not a substitute for terms of service, a privacy policy, or counsel's review. If you need legally enforceable documents, use a dedicated legal template and consult a qualified professional.
Can I remove the Contributor Covenant attribution?
No. The Covenant text is licensed under CC BY 4.0, which requires attribution, so the generated document always includes the version link and license credit. Choose the plain-language base if you need an original policy without third-party attribution.
References & standards
Related tools
ABA Routing Number Generator
Generate 9-digit US ABA routing numbers with weighted Mod-10 checks.
Address Generator
Generate realistic addresses in the correct format for 21 countries — single-line, multi-line, JSON or HTML — plus a postcode validator. Test data only, runs in your browser.
API Key Generator
Generate realistic test API keys — custom prefixes, lengths, alphabets, optional checksum, bulk .env/CSV export. Locally in your browser.
Argentina CUIT / CUIL Generator
Generate and validate 11-digit Argentine CUIT and CUIL numbers with AFIP Mod-11 check digits.
ASCII Text Art Generator
Turn text into large ASCII art banners with multiple figlet fonts
Australia ABN Generator
Generate and validate 11-digit Australian Business Numbers (ABN) using weighted Mod-89.