Guide

How to Generate a URL-Friendly Slug

Enter the source text, choose hyphen, underscore, or dot, and set lowercase conversion according to the result you want. Run the conversion, then check the cleaned slug and its accompanying information.

Tool URL Slug Generator

What this slug generator does

A URL-friendly slug is a compact text value suited to a page address or another naming field. Enter source text, select a separator, decide whether to use lowercase conversion, and run the conversion. The tool cleans the input by normalizing accented characters and handling punctuation or other non-alphanumeric runs. This is useful when a title contains spaces, accents, repeated punctuation, or mixed capitalization. The default settings provide a hyphen separator and enabled lowercase conversion, but the input controls let you choose a different documented separator or turn lowercase conversion off. Empty input is permitted and produces an empty slug, so you can inspect the behavior of the controls without entering a title.

Step-by-step instructions

  1. Enter the title, phrase, or other text that should become a slug. You may leave the text field empty, although an empty field returns an empty result.
  2. Select the separator you want between resulting word groups. The available choices are hyphen, underscore, and dot; hyphen is selected initially.
  3. Check the lowercase conversion setting. Keep it enabled when you want lowercase output, or disable it when preserving the source capitalization is appropriate.
  4. Run the conversion and inspect the generated value. Before the slug is formed, accented letters are normalized to an ASCII-compatible form, so words such as “Café résumé naïve” use unaccented equivalents.
  5. Review the value in context before using it. Confirm that it still identifies the intended page or label, then apply your own naming convention where one exists.

You can change the separator and lowercase setting before running the conversion again. This makes it practical to compare naming styles without changing the source text. Remember that the selected separator affects replacement of punctuation and other non-alphanumeric runs, not just ordinary spaces.

How to read the result

The generated slug replaces each run of non-alphanumeric characters with the separator you selected. Separators at the beginning or end are removed, and repeated separators are collapsed, so the result does not preserve every original space or punctuation mark. Lowercase output depends on the setting: enabled conversion changes the generated value to lowercase, while disabling it is supported and means capitalization should not be assumed.

An empty source field produces an empty slug. Text made only of special characters also produces an empty slug because it contains no letters or numbers to retain. For non-empty text, the result carries additional information: the original text is limited to its first 100 characters, and a character count describes the generated slug. That count refers to the output value rather than the full source text, which may be longer or contain characters removed during conversion.

Use the generated value as the cleaned result, while treating the accompanying information as a way to check what was processed and how long the output is.

Worked example

A content editor is preparing a lowercase value from an accented page title before using it as a page address.

Enter “Café résumé naïve”, keep lowercase conversion enabled, leave hyphen selected, and run the conversion.

The result contains a generated slug using the selected hyphen and lowercase setting. Because the input is non-empty, it also carries the first 100 characters of the original text and the generated slug’s character count.

Limitations

  • The documented separator set contains hyphen, underscore, and dot. Lowercase output depends on the selected setting, and original-text information for non-empty input covers its first 100 characters.

Common errors

  • If the intended style does not appear, the selected separator may not be one of the available choices. Choose hyphen, underscore, or dot, and remember that hyphen is the initial setting.

FAQ

How do I create a lowercase URL-friendly slug?

When lowercase conversion is enabled, enter the text and leave that setting on before running the conversion. The initial hyphen choice is suitable for a result with hyphen separators, while accented letters and non-alphanumeric runs are processed during generation.

Which separators can I use?

The available separator choices are hyphen, underscore, and dot. If you do not change the initial control, the generated value uses a hyphen where separator replacement is needed.

What happens if the input has no usable text?

If the source is empty or contains only special characters, the generated slug is empty. Enter letters or numbers and run the conversion again when you need a non-empty value.

Tool

URL Slug Generator