Slug Generator: Clean, SEO-Friendly URLs
Runs 100% in your browser — your text never leaves this page, and nothing is uploaded or stored.
This slug generator turns any headline into a clean URL slug — lowercase, accent-free, hyphen-joined — with an optional maximum length that ends on a whole word. A slug is the clean, readable part of a web address after the domain — use this url slug generator for blog posts, shop pages and file names, and trim long titles to a whole word.
How to use the Slug Generator
- Paste or type the title, headline or file name into the box — or press Load sample to convert the example headline.
- Choose the separator: hyphens for web addresses (the SEO-friendly default), underscores where a platform demands them.
- Leave Force lowercase ticked for a standard slug, and set a maximum length only if your platform imposes one — 0 means no limit.
- Read the slug in the result box; the note underneath reports its exact character length.
- Copy it straight into your CMS, or download it as a text file if you are preparing several at once.
About this tool
A slug is the readable part of a URL — “/best-tips-for-better-sleep” — and search engines and humans both prefer it short, lowercase and descriptive. This generator strips accents, removes punctuation and symbols, converts ampersands to “and”, and joins words with your chosen separator, following the conventions every major CMS expects. The conversion is careful about the details. Accented letters are reduced to their base letters, so é becomes e and ñ becomes n. Any run of spaces or punctuation collapses into a single separator — never two hyphens in a row — and the finished slug never starts or ends with a separator. Uppercase letters are folded to lowercase unless you untick the option. If you set a maximum length, the slug is first cut at that limit and then pulled back to the last separator inside it, so it ends on a whole word instead of half of one. The one exception is a single very long word with no separator to retreat to, which is cut at the limit itself. Leave the maximum at 0 and there is no limit at all. The same clean names are just as useful outside SEO: give media files, documents and downloads web-safe names that never break when shared, emailed or uploaded to systems that choke on spaces and special characters. Generation happens in your browser, so even the title of an unpublished post stays private. The habits this tool follows — short, descriptive words joined with hyphens — are the ones Google's own URL structure best practices recommend.Worked example
Here is the sample headline that comes with the tool, converted with the default settings (hyphens, lowercase on, no length limit): You paste10 Best Tips for Better Sleep — A Beginner’s Guide (2026 Edition)!You get
10-best-tips-for-better-sleep-a-beginner-s-guide-2026-editionThe note reports “Slug length: 61 characters.” Notice what happened on the way: the em dash, brackets and exclamation mark disappeared, the apostrophe in “Beginner’s” split it into “beginner-s”, and the year survived — numbers are always kept.
Features
- Hyphen or underscore separators, with a force-lowercase option for standard, CMS-ready slugs.
- Accent removal built in: é, ñ, ü and friends become their plain base letters, so slugs stay ASCII-safe.
- Ampersands spelled out as “and” instead of being dropped, so titles keep their meaning.
- An optional maximum length that trims back to a word boundary rather than slicing mid-word.
- An instant length report under every result, so you can check a platform’s limit before you paste.
- Private by design: conversion happens in your browser — titles of unpublished posts go nowhere.