Home › Developer Tools › Commit Message Generator

Commit Message Generator

Build a clean Conventional Commit message field by field: type, optional scope, a short imperative subject, a wrapped body, a BREAKING CHANGE note and issue references. Every rule is checked as you type, and you can copy the message or a ready-to-run git commit command.

Last updated:

Type

0

Imperative, lower case, no full stop. Complete the sentence "If applied, this commit will …"

Commit message


        

        

Checks

    Advertisement
    Advertisement

    How to use the Commit Message Generator

    1. Pick the type that matches the change: feat for a new feature, fix for a bug fix, docs, refactor, and so on.
    2. Add a scope (optional) such as api, auth or ui to say which part of the code changed.
    3. Write the subject in the imperative mood, lower case and without a full stop: "add password reset", not "Added password reset."
    4. Explain why in the body if the change needs context, then tick Breaking change and describe what users must do if the change is not backward compatible.
    5. Add issue references, review the checks, and copy the message or the git commit command.

    Conventional Commit format

    The Conventional Commits 1.0.0 specification structures a commit message like this:

    <type>[optional scope][!]: <description>
    
    [optional body]
    
    [optional footer(s)]
    • Header: the only required line. A type, an optional scope in brackets, an optional ! for breaking changes, a colon, a space and a short description.
    • Body: free text after one blank line. Explain what changed and why, not how; the diff already shows how.
    • Footers: after another blank line, one per line in Token: value or Token #value form, such as BREAKING CHANGE: …, Refs: #123 or Co-authored-by: Name <email>.

    Types and version bumps

    TypeUse it forExampleSemVer bump*
    featNew functionality for usersfeat(cart): add coupon fieldMinor (1.4.0 → 1.5.0)
    fixBug fixesfix(api): return 404 for unknown idsPatch (1.4.0 → 1.4.1)
    perfSpeed or memory improvementsperf: cache parsed templatesPatch
    refactorRestructuring without changing behaviourrefactor(db): extract query builderNone
    docsDocumentation onlydocs: explain env variables in READMENone
    styleFormatting, white space, linting fixesstyle: apply prettier to srcNone
    testAdding or fixing teststest(auth): cover expired tokensNone
    buildBuild tools and dependenciesbuild(deps): bump vite to 5.4None
    ciCI pipelines and scriptsci: cache npm in GitHub ActionsNone
    choreMaintenance that touches no source or testschore: update .editorconfigNone
    revertUndoing an earlier commitrevert: feat(cart): add coupon fieldDepends
    any type + ! or BREAKING CHANGE:Changes that are not backward compatiblefeat(api)!: drop v1 endpointsMajor (1.4.0 → 2.0.0)

    *Default behaviour of semantic-release and standard-version with the Angular / conventional preset. Many teams configure perf, refactor or docs differently.

    Length rules this tool checks

    • 50 characters for the header is the classic guideline (from the Git project and "How to Write a Git Commit Message"): it fits in git log --oneline, GitHub commit lists and email subjects.
    • 72 characters is the usual hard limit for the header and the wrap width for body lines, because git log indents the body by 4 spaces and should still fit an 80-column terminal.
    • 100 characters is commitlint's default header-max-length and body-max-line-length in @commitlint/config-conventional; longer lines fail the lint. URLs are not counted, since they can't be wrapped.

    Tip: if the subject needs the word "and", the commit probably does two things. Splitting it makes reviews, reverts and git bisect easier. For the Git commands to amend, squash or reword a commit, see the Git Cheat Sheet.

    Frequently asked questions

    What is a Conventional Commit?

    Conventional Commits is a lightweight specification for commit messages. The first line has the form type(scope): description, for example fix(parser): handle empty input. Optional body and footer paragraphs follow after a blank line. The structure lets tools generate changelogs and decide semantic version bumps automatically.

    Which commit types can I use?

    The specification itself only defines feat and fix. The widely used commitlint config-conventional preset, based on the Angular convention, also allows build, chore, ci, docs, perf, refactor, revert, style and test. Those 11 types are offered here.

    How do I mark a breaking change?

    Add an exclamation mark before the colon, as in feat(api)!: remove v1 endpoints, and/or add a footer that starts with BREAKING CHANGE: followed by a description. A breaking change triggers a major version bump in semantic-release and similar tools, whatever the commit type.

    How long should a commit subject be?

    Aim for 50 characters or less in the whole first line so it is fully visible in git log --oneline, GitHub and most tools. 72 characters is a common hard limit, and commitlint's default header-max-length is 100. Body lines are usually wrapped at 72 characters.

    Why write the subject in the imperative mood?

    Git itself writes messages like Merge branch 'x' and Revert 'y', so a subject that completes the sentence 'If applied, this commit will ...' reads consistently: 'add login form', not 'added login form' or 'adds login form'.

    How do I close a GitHub or GitLab issue from a commit?

    Put a closing keyword and the issue number in the footer, for example Closes #42 or Fixes #42. GitHub closes the issue when the commit reaches the default branch; GitLab supports the same keywords. Refs #42 links the issue without closing it.

    How do I use a multi-line message with git commit?

    Each -m flag becomes its own paragraph separated by a blank line, so git commit -m 'header' -m 'body' -m 'footer' produces a correctly formatted message. The generated command uses this form with safe quoting for Bash or PowerShell.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Git Cheat SheetSearchable Git command reference by task, with copy buttons and an undo/rename/fix wizard.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.README GeneratorFill in a form and get a polished README.md with badges, install, usage and license, live preview.Markdown TOC GeneratorGenerate a linked table of contents from Markdown headings with GitHub-style anchors.GitLab CI Config GeneratorGenerate a .gitlab-ci.yml with stages, jobs, images, cache, artifacts and rules from templates.QR Code GeneratorMake QR codes for links, Wi-Fi, email and more.Barcode GeneratorCreate Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG.UUID GeneratorGenerate UUID v4 and v7 / GUIDs in bulk and copy or download them.Schema Markup Generator (JSON-LD)Create JSON-LD structured data for FAQ, Product, Article and more.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.Fake Data GeneratorGenerate mock data as JSON, CSV or SQL.Random String GeneratorGenerate secure random strings and tokens in bulk with any length and character set.API Key GeneratorCreate secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.Cron Expression GeneratorBuild crontab schedules visually, read them in plain English and see the next run times.URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines.JSON Schema GeneratorTurn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats.License GeneratorCreate a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year.ULID GeneratorGenerate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps.Htpasswd GeneratorCreate .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth.Placeholder Image GeneratorCreate placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI.Ads.txt GeneratorCreate or validate ads.txt and app-ads.txt files: seller lines, cert IDs and variables.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.JSON to Zod SchemaInfer a Zod (or Yup) schema from sample JSON with optional, nullable and z.infer types.Linux Commands Cheat SheetSearchable Linux and bash command reference with flags explained, examples and copy buttons.LLMs.txt GeneratorBuild an llms.txt file for AI crawlers: summary and link sections, import from your sitemap.Nano ID GeneratorGenerate secure Nano IDs with custom alphabet, length and count, plus a collision calculator.Nginx Config GeneratorBuild an nginx server block: static site, SPA, reverse proxy or PHP, with SSL, gzip and redirects.OpenAPI / Swagger ViewerView OpenAPI 2/3 JSON or YAML as interactive API docs with validation and an endpoint list.package.json GeneratorFill a form and get a valid, npm-ready package.json with scripts, dependencies and checks.PKCE Code Challenge GeneratorGenerate an OAuth 2.0 PKCE code_verifier and S256 code_challenge, build auth URLs, verify pairs.Regex GeneratorBuild regular expressions visually from blocks or presets (email, date, phone) and test them live.Database Schema DesignerDesign tables and relationships visually, then export SQL for MySQL, PostgreSQL or SQLite.Docker Compose GeneratorBuild a docker-compose.yml with a form: services, ports, volumes, env, healthchecks and presets.Dummy File GeneratorCreate test files of an exact size in KB, MB or GB with zeros, random bytes or text.FFmpeg Command GeneratorPick a task and options, get the exact ffmpeg command with every flag explained.ESLint Config GeneratorGenerate a flat eslint.config.js for JavaScript, TypeScript, React or Node with rule presets.Git Branch Name GeneratorTurn a ticket ID and title into a clean, valid git branch name like feature/PROJ-12-add-login.Jinja2 Template TesterRender Jinja2 templates with YAML or JSON variables using real Jinja2, with clear error lines.JSON Schema Mock Data GeneratorGenerate realistic sample JSON from a JSON Schema: formats, patterns, $ref, seeds and counts.Kubernetes Secret GeneratorCreate Kubernetes Secret YAML from key/value pairs or .env with auto base64, or decode one.Kubernetes YAML ValidatorValidate Kubernetes manifests against the API schema of a chosen version, with error paths.Prettier Config GeneratorToggle Prettier options, preview formatted code live and copy your .prettierrc file.Quartz Cron GeneratorBuild and explain Quartz and Spring cron expressions with seconds, ?, L, W and #, plus next fire times.README Badge GeneratorCreate Shields.io-style README badges for license, version, build and custom labels.Systemd Service File GeneratorCreate a systemd .service unit with ExecStart, user, restart policy, environment and hardening.tsconfig.json GeneratorBuild a tsconfig.json with target, module, strict checks and path aliases, each option explained.Access Log AnalyzerAnalyze Apache and Nginx access logs: top URLs, IPs, status codes, bots and traffic charts.Regex String GeneratorGenerate random test strings that match any regular expression, checked against the real regex.ASCII Table GeneratorTurn CSV or pasted cells into plain-text tables: MySQL, Markdown, Unicode box and reST styles.Folder Tree GeneratorTurn a local folder or an indented list into an ASCII directory tree for your README.GitHub Actions Workflow GeneratorBuild a GitHub Actions CI workflow: triggers, matrix, caching, tests, Pages or Docker deploy.Kubernetes YAML GeneratorGenerate Deployment, Service, Ingress, ConfigMap, Secret and HPA manifests with safe defaults.OpenAPI EditorEdit OpenAPI/Swagger YAML or JSON side by side with live API docs, validation and download.OpenAPI ValidatorValidate OpenAPI 3.0/3.1 and Swagger 2.0 specs: schema errors, broken $refs, line numbers.Pivot Table MakerBuild pivot tables from CSV or Excel by drag and drop: sum, count, average, charts, export.SQL Query BuilderBuild SELECT queries visually: joins, filters, GROUP BY, ORDER BY and LIMIT, as clean SQL.Truth Table GeneratorType a logic expression and get its full truth table, minterms and canonical DNF/CNF.TypeScript PlaygroundWrite TypeScript with live type checking, see the compiled JavaScript and run it in your browser.Article Schema GeneratorCreate Article, BlogPosting or NewsArticle JSON-LD with headline, authors, dates and images.Event Schema GeneratorCreate Event JSON-LD with dates, venue or online location, tickets, organizer and performers.Google Search Query BuilderBuild advanced Google searches with site:, filetype:, intitle:, exact phrases and date operators.HowTo Schema GeneratorCreate HowTo JSON-LD with steps, tools, supplies, total time and cost, then copy it.Htaccess GeneratorBuild an Apache .htaccess file: HTTPS, www, gzip, caching, error pages, IP blocks, hotlinks.HTML Email Template BuilderDrag and drop blocks to build a responsive, table-based HTML email with inline styles.Organization Schema GeneratorCreate Organization JSON-LD with logo, URL, contact points, address and social profiles.
    See all 85 Code Generators & Builders →