Slugify — Convert Text to URL-Friendly Slugs Online
Convert any title or text to a URL-friendly slug (e.g. "Hello World!" → "hello-world"). Handles Unicode accents, ampersands, punctuation, and custom separators. Batch mode processes one line per slug. 100% local.
Last updated:
Paste any title or text to instantly get URL-friendly slugs ("Hello World!" → "hello-world"). Handles Unicode accents (é → e), ampersands (& → and), punctuation, and lets you pick separator, max length, and strict-ASCII vs Unicode-preserving modes. Batch mode does one slug per line.
What is Slugify?
A slugify tool converts arbitrary human-readable text into a short, URL-safe identifier — the piece of a URL like /blog/hello-world at the end of a permalink. Getting slugification right is trickier than it looks: you need consistent handling of Unicode accents (should café become cafe or café?), ampersands (& → and, or drop?), consecutive punctuation, and length limits. This tool uses Unicode NFKD normalization to strip accents, converts ampersands to 'and' by default (a common SEO best practice), collapses runs of non-alphanumeric characters into a single separator, and truncates at word boundaries so the tail of a long title reads cleanly.
How to slugify text online
- 1Paste one or more titles into the input pane (one per line for batch mode).
- 2Pick a separator (hyphen is the SEO default), toggle case, and choose strict ASCII vs Unicode-preserving mode.
- 3The output pane shows the slugs; the side-by-side preview shows each original title next to its slug.
- 4Optionally set a max length — the truncation happens at a separator so no word is cut mid-way.
Use Cases
Blog / CMS URL generation
Generate consistent, SEO-friendly permalinks from post titles. Batch a whole content spreadsheet at once.
Filenames from titles
Slugify with underscore separator to get filenames like report_2026_q1.pdf from titles.
GitHub / Markdown anchor IDs
Preview the anchor GitHub will generate for a heading before you commit — pattern is very close to strict slugify with hyphens.
Database unique keys
Combine slug + numeric id (e.g. hello-world-42) for URL-friendly identifiers that are still guaranteed unique.
Tips & Best Practices
- ▸Google explicitly recommends hyphens over underscores in URLs. Use underscore only when you need filesystem compatibility with legacy tools.
- ▸For non-Latin sites, disable 'Strict (ASCII only)' so 你好-world stays 你好-world. Modern browsers and search engines handle Unicode URLs correctly.
- ▸The '& → and' rule works well in English. For other languages, disable it and let the character become a separator instead — 'Und' or 'et' is not universally right.
- ▸For stable long-term slugs, save a slug alongside the record and treat it as immutable — regenerating from a title later can break existing links.
Frequently Asked Questions
How does slugify handle non-ASCII characters?
Accented letters are transliterated to their ASCII equivalents (é → e, ñ → n, ü → u) via Unicode NFKD normalization. Non-Latin scripts (CJK, Arabic, Hebrew) are removed in strict mode; disable 'Strict (ASCII only)' to preserve them for non-Latin URLs.
Which separator should I use?
Hyphen (-) is the de-facto standard for SEO — Google explicitly recommends it over underscore. Use underscore (_) for filenames on legacy systems, or dot (.) when the slug is a subdomain component.
Are ampersands and special punctuation handled?
Yes. '&' is converted to 'and' by default (toggle-able), quotes and apostrophes become separators, and consecutive punctuation collapses to a single separator. Emojis and control characters are stripped.
Can I set a maximum length?
Yes — the tool truncates at a word boundary (the last separator before the limit) to avoid cutting a word mid-way. Set 0 to disable.
Is the input uploaded anywhere?
No. All processing runs entirely in your browser as client-side JavaScript.
Related Tools
Regex Tester
Test regular expressions online. Live match highlighting, capture groups, and support for JavaScript flags (g, i, m, s, u, y).
Regex Replace
Find and replace text with a regular expression online. Supports every JavaScript flag (g, i, m, s, u, y), all backreferences ($1..$9, $&, $`, $', $<name>), and escape sequences (\n, \t) in the replacement. Live match-by-match preview and diff. 100% local.
Text to Speech
Convert text to spoken audio using your browser's built-in Speech Synthesis API. Pick from all voices installed on your OS, adjust rate, pitch, and volume. No account, no download, no upload — 100% local.
XML Formatter
Format, beautify, and validate XML documents online. Handles namespaces, CDATA sections, and mixed content.
SQL Formatter
Format and beautify SQL queries. Supports SELECT, JOIN, subqueries, CTEs, and multiple SQL dialects.
Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and more.