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.

Naming conventions by language, from each language’s own published style guide.
LanguageVariablesFunctionsTypesConstantsSource
JavaScript and TypeScriptcamelCasecamelCasePascalCaseUPPER_SNAKE_CASEGoogle JavaScript Style Guide
Pythonsnake_casesnake_casePascalCaseUPPER_SNAKE_CASEPEP 8, Style Guide for Python Code
GocamelCasePascalCase when exported, camelCase when notPascalCasePascalCase or camelCase, not shoutingEffective Go, names
Rustsnake_casesnake_casePascalCaseUPPER_SNAKE_CASERust API Guidelines, naming
JavacamelCasecamelCasePascalCaseUPPER_SNAKE_CASEGoogle Java Style Guide
CSSkebab-casekebab-casekebab-case for classeskebab-case custom propertiesCSS Custom Properties, MDN
SQLsnake_casesnake_casesnake_case tablesUPPER_SNAKE_CASE keywordsUnquoted identifiers fold case, PostgreSQL documentation
URLs and file nameskebab-casekebab-casekebab-casekebab-caseKeep a simple URL structure, Google Search Central

Who uses it

Bloggers and publishersGenerate a clean permalink from a headline that matches your URL style every time.
DevelopersCreate safe identifiers and file names from user supplied titles without special characters.
SEO specialistsProduce short, readable, keyword rich slugs that are consistent across the site.
Content teamsStandardize how titles become URLs so nothing ships with spaces or odd characters.

Worked example

Try it with fictional text

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.


Related tools