Slugify
Turn any text into a clean, URL-friendly slug.
The slugify
Paste a title, or one title per line, and each becomes a URL slug: lowercase letters and digits joined by single hyphens. Accented letters are flattened, so café becomes cafe, punctuation and symbols are dropped, and spaces, underscores and runs of hyphens collapse into one hyphen with none left at either end. Acme & Globex: A 2026 Partnership! becomes acme-globex-a-2026-partnership.
About the slug generator
The WordBench slug maker converts a title or phrase into a clean, URL friendly slug. It lowercases the text, replaces spaces with hyphens, strips punctuation, and flattens accented letters, leaving a tidy string that is safe to use in a web address, a filename, or an identifier.
A good slug is readable, stable, and free of characters that need escaping in a URL. Writing one by hand for every post or page is repetitive and easy to get slightly wrong. Slugify applies the same rules every time, so your URLs stay consistent across a whole site.
Accented and non English letters are transliterated to their closest plain equivalents where possible, and anything left that is not a letter, number, or hyphen is removed. Multiple separators collapse into a single hyphen, and leading or trailing hyphens are trimmed away.
Which case does which language expect?
Case is not a preference in code, it is a documented convention per language, and getting it wrong is the fastest way to look like a visitor in a codebase. Each row links to the style guide it comes from.
| Language | Variables | Functions | Types | Constants | Source |
|---|---|---|---|---|---|
| JavaScript and TypeScript | camelCase | camelCase | PascalCase | UPPER_SNAKE_CASE | Google JavaScript Style Guide |
| Python | snake_case | snake_case | PascalCase | UPPER_SNAKE_CASE | PEP 8, Style Guide for Python Code |
| Go | camelCase | PascalCase when exported, camelCase when not | PascalCase | PascalCase or camelCase, not shouting | Effective Go, names |
| Rust | snake_case | snake_case | PascalCase | UPPER_SNAKE_CASE | Rust API Guidelines, naming |
| Java | camelCase | camelCase | PascalCase | UPPER_SNAKE_CASE | Google Java Style Guide |
| CSS | kebab-case | kebab-case | kebab-case for classes | kebab-case custom properties | CSS Custom Properties, MDN |
| SQL | snake_case | snake_case | snake_case tables | UPPER_SNAKE_CASE keywords | Unquoted identifiers fold case, PostgreSQL documentation |
| URLs and file names | kebab-case | kebab-case | kebab-case | kebab-case | Keep a simple URL structure, Google Search Central |
Who uses it
Worked example
Start with the headline "Acme & Globex: A 2026 Partnership!".
Slugify returns acme-globex-a-2026-partnership. The ampersand and colon are dropped, the exclamation mark is removed, spaces become single hyphens, and the whole thing is lowercased into a slug you can paste straight into a URL.
Frequently asked questions
What is a slug? A slug is the human readable part of a URL that identifies a page, usually made of lowercase words separated by hyphens. It comes from a title but is stripped of spaces, punctuation, and anything that is awkward in a web address.
What is a slug?
A slug is the human readable part of a URL that identifies a page, usually made of lowercase words separated by hyphens. It comes from a title but is stripped of spaces, punctuation, and anything that is awkward in a web address.
Why replace spaces with hyphens instead of underscores?
Search engines and most style guides favor hyphens as word separators in URLs because they are treated as spaces between words. Underscores can join words together for indexing purposes, which is usually not what you want in a slug.
Does it handle accented characters?
Yes. Accented letters are reduced to their base form where possible, so a title with characters like é or ü produces a plain ASCII slug rather than dropping those letters entirely.
What happens to numbers and symbols?
Numbers are kept because they are valid and often meaningful in a URL. Symbols and punctuation are removed, and any resulting run of separators is collapsed into a single hyphen.
Exactly what this tool counts, and why the result can differ from your word processor, is written out on the methodology page. Platform character limits, with the unit each one counts in and the date it was checked, are on the character limits pages.