Text & writing · Transform
Slugifier — Text to URL Slug
Convert any text to a clean URL slug (hyphen or underscore). Removes special characters, handles accents, and collapses spaces. Free online slugifier tool.
How it works
Converts any text into a URL-safe slug by lowercasing (optionally), replacing spaces and special characters with hyphens or underscores, and collapsing consecutive separators. Slugs are used in URLs, filenames, and identifiers.
Step by step
- 1Trim leading and trailing whitespace from the input.
- 2Optionally convert all characters to lowercase.
- 3Replace accented characters with their ASCII equivalents (e.g. é → e).
- 4Replace any character that is not alphanumeric with the chosen separator.
- 5Collapse consecutive separators into one and trim separators from the start and end.
Examples
Blog post title
Punctuation and spaces are replaced with hyphens; the result is a clean URL-safe string.
Inputs
- text:
- Hello World! This is a URL slug example.
- separator:
- -
- lowercase:
- true
Result
- slug:
- hello-world-this-is-a-url-slug-example
Python variable name
With underscore separator this produces a Python-style snake_case identifier.
Inputs
- text:
- My Variable Name
- separator:
- _
- lowercase:
- true
Result
- slug:
- my_variable_name
Frequently asked questions
What is a URL slug?▾
A slug is the human-readable, URL-safe part of a web address — for example 'how-to-bake-bread' in 'example.com/blog/how-to-bake-bread'. Slugs use only lowercase letters, numbers, and hyphens.
Why are hyphens preferred over underscores in URLs?▾
Google treats hyphens as word separators (improving SEO) but treats underscores as word joiners. For URLs intended to rank in search, hyphens are the standard recommendation.