Git Branch Sanitizer
Convert a ticket title or phrase to a valid git branch name
Paste a ticket title or phrase to get a valid git branch name.
Enter text to generate a branch name
Git Branch Sanitizer
This tool turns human-readable text (e.g. ticket titles, feature names) into a valid git branch name. Git branch names have strict rules: no spaces, no consecutive dots, no leading dot or hyphen, and certain characters are disallowed. The sanitizer lowercases text, replaces spaces with hyphens, strips invalid characters, and keeps slashes for hierarchy (e.g. feature/login).
How it works
- Spaces and repeated spaces become a single hyphen.
- Invalid characters (~ ^ : * ? [ ] \ and others) are removed.
- Leading and trailing dots or hyphens are trimmed; the result never ends with
.lock. - Slash is allowed for branch hierarchy (e.g.
feature/add-login).
Use cases
- Jira / ticket titles: Turn "BUG-123 Fix null pointer" into
bug-123-fix-null-pointer. - Feature names: Convert "Feature: Add user login" to a valid branch name.
- Release branches: Sanitize "Release/v2.0" while keeping hierarchy.
For URL slugs (permalink, SEO), use the Slug Generator; git branch names follow different rules.