🔤 Slug and filename formatter
Kebab case converter
Convert titles, labels, filenames, metadata fields, and batch lists into clean kebab case with lower or upper output, custom separators, Unicode folding, number grouping, slug-safe filtering, and duplicate hyphen cleanup.
Start with a realistic text-cleanup task, then fine tune the separator, case, number handling, Unicode behavior, and batch output rules.
DISCLOSURE: This post may contain affiliate links, meaning when you click the links and make a purchase, I receive a commission. As an Amazon Associate I earn from qualifying purchases.
Paste one phrase or many lines. Slug-safe mode keeps URL-ready ASCII, while broader modes can retain Unicode letters for internal labels.
| Separator | Example output | Common use | Slug-safe note |
|---|---|---|---|
| Hyphen | book-review-notes | URLs, slugs, CSS utility names | Safest default for public paths. |
| Double hyphen | book--review--notes | Internal IDs, BEM-like labels | Use cleanup carefully if double marks matter. |
| Underscore | book_review_notes | Legacy systems, data exports | Not classic kebab, but useful fallback. |
| Dot | book.review.notes | Package names, compact labels | Avoid for final file extensions. |
| Tilde | book~review~notes | Rare internal separators | Usually not preferred for slugs. |
| Input pattern | Default output | Control involved | Why it matters |
|---|---|---|---|
| Chapter 12 Notes | chapter-12-notes | Number grouping | Splits words and numbers for readable labels. |
| Cafe Creme Brulee | cafe-creme-brulee | Unicode folding | Turns accented words into ASCII-friendly slugs. |
| Draft---Final | draft-final | Duplicate cleanup | Collapses repeated separator runs. |
| The Book of Maps | book-maps | Stop word removal | Shortens slugs while keeping core terms. |
| Vol. 2.0 Update | vol-2-0-update | Version mode | Keeps version-like numbers readable. |
| Batch mode | Line breaks | Blank lines | Best fit |
|---|---|---|---|
| Convert each line | Preserved | Preserved | Metadata titles, filename lists, headings. |
| Treat as one phrase | Merged | Merged | Long title pasted across wrapped lines. |
| Skip empty lines | Preserved between kept lines | Removed | Clean export lists and CMS batches. |
| Numeric prefixes | Preserved | Skipped | Ordered chapter files and lesson IDs. |
| Format | Example | Human readability | Technical fit |
|---|---|---|---|
| Lower kebab | quiet-library-notes | High | URLs, slugs, CSS, static file names. |
| Upper kebab | QUIET-LIBRARY-NOTES | Medium | Visible catalog IDs and uppercase code sets. |
| Custom separator | quiet--library--notes | Medium | Internal naming patterns that reserve hyphen groups. |
| Slug-safe folded | cafe-society-edition | High | Public paths where ASCII is preferred. |
Kebab case is lower-case words separated by hyphens. It’s a naming convention you’ll see used for system endpoints, website addresses, file names, and more. The beauty of kebab case is that it strips out special characters and spaces, solving many formatting headaches.
The system dont have to error out on reading a kebab-case string, and humans can read it easy. This means fewer compatibility issues for any digital content you transfer or store. Picking the right settings comes down to weighing a few key trade-offs.
How to Use and Set Up Kebab Case
Numbers, stop words, and accented characters each requires separate configuration decisions. You can tweak settings for case, separators, number grouping, and cleanup rules. Afterward, you can test those configurations against a subset of data and once youre ready, apply them to your entire dataset.
For public web addresses you want maximum compatibility, which usually means folding accented letters to plain ASCII, removing anything that isnt a letter or number, and collapsing repeated separators. For example, a product page might be converted from “Crème Brûlée Special” to “creme-brulee-special”. To make them stable, strip out any symbols and replace accented letters with there equivalent standard character.
For example, convert é to e. If you dont do this, there’s a chance that some servers may not handle special characters and break your links. It also applies to bulk rename of files. If your renaming several titles at once, one wrong setting means inconsistent results across all those files.
Check they looks correct before saving to disk. Numbers create their own special set of decisions. Do you want “Version 2.3 Update” stored as “version-2-3-update”?
Or maybe “version-23-update”? This choice depends on your storage requirements (the former retains the decimal point for easy human reading; the latter strips out all punctuation for system compatibility). Ultimately, it’s a matter of deciding which format is easier to read and sort by, so that the resulting string meets everyones (human + technical) needs.
Similarly, think about removing common filler words. Removing common stop words like ‘and,’ ‘of,’ ‘a,’ and ‘the’ makes the resulting slug much shorter. It preserves the same meaning as the original format, while removing them saves space.
But sometimes those stop words need to stay. Depending on what your project needs, you tweak the filtering rule accordingly. The separator character is configurable to suit your technical environment.
Traditionally, a single-hyphen separator was used in kebab case, though you can replace this with a double-hyphen where there are directories within directories. For example, software packages may have periods as part of their name, while certain config files may have a tilde character as part of the name. Choose the separator that makes sense both visually and for the technical requirements of the target platform; the resulting names will still be consistent and functional.
Batch processing lets you convert many titles at once. The tool eliminates the need to format text manually, as long as your rule set is consistent, it applies the same way to every line. Configure the kebab case prior to running the batch by specifying what happens with whitespace, automatic numbering and empty lines.
Once configured, these settings apply to all items in the list, if done incorrect, theres lots of editing ahead. You check the output quickly, small tweaks now eliminate alot of re-work later. When using international text, Unicode folding deserves special attention in our increasingly international digital world.
For kebab case, you need to map characters to a standard form so the string works on all operating systems. Because most servers will not accept anything but standard input, you substitute accented letters for their base letter equivalents. This keeps links working and avoids any potential encoding errors.
Before pushing out the final file, you test your mapping configuration. The kebab case works when it’s something that is both readable by humans and compatible with machines. It’s not a rigid rule but a flexible tool.
You tweak its settings depending on the intended purpose, like an interface label needs to be formatted differently than a database key which in turn should be different from a web address. Yet it’s still easy enough that you can do this while retaining control over what ends up on the screen. And you approach these changes consistently: the naming scheme throughout all your platforms will stay uniform.

