Live demo (works without JavaScript):
Sample input — paste anything and watch the result update.sample-input-paste-anything-and-watch-the-result-updateWritten by Jane Smith · Reviewed by Sarah Mitchell · July 27, 2026
Convert any text into a URL-friendly slug. Removes special characters, converts spaces to hyphens, and lowercases everything.
A slug is the readable tail of a web address that describes the page it points to, the part of a URL that survives in search results and address bars. Writing slugs by hand is tedious, so this page converts a title or a phrase into one automatically: it lowercases the text, removes punctuation and accents, replaces every space with the separator you choose, and hands back a string ready for a CMS, a router, or a filename. The conversion runs in the browser, so unpublished titles stay off the network.
Type Hello, World! 2026 into the input box, leave Preserve digits checked and the separator at its default dash, then click Convert to Slug. Lowercasing produces hello, world! 2026, and the punctuation is then stripped because a comma and an exclamation mark are neither letters nor digits. The words and the year remain, and each space becomes a dash, so the output is:
hello-world-2026
Uncheck Preserve digits and run the same input again: the digits vanish along with the punctuation, leaving hello-world. The year disappears because this mode keeps only letters, spaces, and hyphens.
Accents are removed before anything else is filtered, which most writers want for a URL. Paste Cafe with an acute accent on the first e followed by an em dash and a word:
Café Rendezvous — Opening Soon
The accent is dropped, so Cafe is kept; the em dash, which is punctuation, is stripped; and the three words are joined with dashes. The output reads:
cafe-rendezvous-opening-soon
The same treatment applies to résumé becoming resume, naïve becoming naive, and façade becoming facade, so the slug stays printable on systems that reject accented URLs.
The conversion is a small pipeline of string operations rather than one clever expression. First the text is lowercased, so URL_Builder and url_builder produce the same slug. Next a Unicode normalization step splits accented letters into a base letter plus a combining mark, and the combining marks are deleted, which is why Café becomes cafe before any filtering happens. A whitelist then removes every character that is not a letter, a digit, a space, or a hyphen, or not a letter, a space, or a hyphen when Preserve digits is off. Runs of spaces and hyphens are squeezed into single spaces, the ends are trimmed, and each remaining space is swapped for the separator you picked. Each step feeds the next, and the order is deliberate: accents must fall before the whitelist, and the whitelist must run before the separator swap so that the separator itself is not filtered away.
The separator box defaults to a dash and accepts up to five characters, so an underscore, a dot, or a short pair like two dashes are all valid choices. The same separator is used everywhere, which is what joins a multi-word title into one clean token. Most URLs and CMS systems expect a dash, some communities prefer underscores, and a dot is occasionally used for file names; pick whichever matches where the slug will live. Preserve digits matters for titles that carry a year or a version number, such as a guide published in 2026 that should keep its four-digit year in the address. The digits inside phone numbers and addresses are kept just as eagerly, which may or may not be what you want.
Accented Latin letters survive the pipeline without their accents, as the examples above show. Letters from scripts that are not based on the Latin alphabet do not make it through at all. A title in Cyrillic, Arabic, Hebrew, or Chinese is stripped character by character, because the whitelist only admits a to z, digits, spaces, and hyphens. If every character is removed, the output is empty, which is a genuine failure mode when slugging foreign-language titles. Emoji and symbols such as the at sign and the ampersand are removed as well, since they are not address-safe characters. The tool transliterates nothing; turning Cyrillic into Latin letters is a different operation that needs a mapping table this page does not carry.
A hyphen already present in the input is treated as a separator, so Hello-World and Hello World produce the same slug. Apostrophes are removed outright, so John's becomes johns, and underscores vanish without leaving a space, so my_file becomes myfile rather than my-file. CamelCase words are not split, so HelloWorld becomes helloworld. A title that is only digits, like 2026, stays as-is when digits are preserved and becomes empty when they are not. Leading or trailing spaces are trimmed, and a doubled space between words collapses, so sloppy titles still produce one clean slug. Two different titles can collide, since a b testing and A/B Testing both yield a-b-testing.
Spaces and punctuation need percent-encoding in web addresses: a space becomes %20, a question mark begins the query string, and an ampersand separates parameters. Leaving them in a slug produces addresses that are hard to read and easy to break when pasted. Stripping them keeps the slug printable, copyable, and pasteable, which is why the whitelist admits only letters, digits, spaces, and hyphens. Letters and digits are the one set of characters every URL, filename, and CMS accepts consistently across systems, so the pipeline errs on the side of removing anything else. A title that is already a slug, such as my-post-title, passes through with its hyphens kept, and a very long title produces a very long slug, because there is no length limit; shorten the input first if the target system caps its URLs.
Blog titles, article headings, and section names are the natural inputs, because they describe content in a few words and produce stable, shareable addresses. The tool also suits file names that must avoid spaces and uppercase letters. Do not use it for user-generated content that must stay readable, such as usernames, and do not expect it to transliterate non-Latin scripts, because it removes them rather than rewriting them. When you need a random identifier with no meaning at all, a dedicated generator is a better fit.
The whitelist keeps only a to z, digits, spaces, and hyphens, so a title written entirely in Cyrillic, Arabic, Hebrew, or Chinese is removed character by character.
Existing hyphens are treated as separators and squeezed together with spaces, so Hello-World converts to the same slug as Hello World.
Yes. Type the character into the separator box, which accepts up to five characters, and it will be used everywhere.
The normalization step splits the accented letter into a plain letter plus a combining mark and deletes the mark, so the accent is gone before anything else runs.
No. A/B Testing and a b testing both become a-b-testing, so add a date or an identifier when uniqueness matters.
An underscore is not on the whitelist, so it is removed without leaving a space, which joins the two halves of the word. Use a space in the input to keep them apart.
No. The output matches the length of the input after cleaning, so shorten the title first if the system receiving the slug caps its URLs.