Text to Slug Generator
Pricing
Pay per event
Text to Slug Generator
🔗 Convert text, titles, or headings to clean URL-friendly slugs. Batch-process thousands of strings with Unicode transliteration, stop-word removal, custom separators, and max-length truncation.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
10 days ago
Last modified
Categories
Share
Convert any text, title, or heading into a clean, URL-friendly slug — instantly, in bulk, with full Unicode support.
Paste hundreds of blog post titles, product names, or category labels and get back SEO-optimized slugs in seconds. No scraping, no proxy, no waiting — pure computation at API scale.
🔍 What does it do?
Text to Slug Generator takes a list of text strings and converts each one into a valid URL slug: lowercase, hyphen-separated, with accented characters transliterated and special symbols stripped.
Input:
Café au Lait & Crêpes — A French Classic!10 Best SEO Tips for 2024 (Proven Strategies)Hello World: Getting Started with Node.js
Output:
cafe-au-lait-and-crepes-a-french-classic10-best-seo-tips-for-2024-proven-strategieshello-world-getting-started-with-nodejs
Works with any language, supports custom separators, optional stop-word removal, max-length truncation, and deduplication.
👥 Who is it for?
Content managers migrating a CMS
You have 5,000 article titles exported from WordPress or Drupal. You need slugs for the new platform. Paste them all in, export as CSV, done in under a minute.
SEO specialists building URL structures
You're planning a site architecture and need to verify every planned URL slug is clean, consistent, and keyword-dense. Remove stop words to keep slugs short and punchy.
Developers automating pipelines
Your n8n or Make.com workflow generates product listings dynamically and needs to create URL-safe IDs for each. Call this actor via API from any automation tool.
E-commerce teams adding new SKUs
You're adding 500 new products and need a slug for each one. Batch-process the entire catalog in one run instead of clicking through an admin UI one product at a time.
Data engineers standardizing identifiers
You need deterministic, reproducible slugs for database keys, file names, or API endpoints derived from human-readable labels.
✅ Why use it?
- Zero configuration needed — paste your texts, get slugs. All options have sensible defaults.
- Unicode/international support — accented characters (é, ü, ñ, ç), Cyrillic, Arabic, CJK (Chinese/Japanese/Korean), Thai, Hebrew, Greek and 30+ scripts transliterated automatically via
any-ascii. - Stop-word removal — strip "the", "and", "of" etc. for shorter, more keyword-dense slugs.
- Batch-optimized — process thousands of strings in a single run. No rate limits, no per-page overhead.
- Consistent — same input always produces the same slug. Safe for use as a deterministic key generator.
- Flexible separators — hyphen (
-), underscore (_), or dot (.) depending on your platform conventions. - Max-length truncation — truncate at a word boundary to stay within CMS or routing constraints.
- Deduplication — skip repeated inputs to avoid duplicate rows in your output.
📊 Output data
Each input text produces one output row:
| Field | Type | Description |
|---|---|---|
index | number | Position of this text in the input array (0-based) |
text | string | Original input text, trimmed |
slug | string | The generated URL-friendly slug |
characterCount | number | Number of characters in the slug |
wordCount | number | Number of words (segments between separators) |
wasTruncated | boolean | true if slug was shortened due to maxLength |
stopWordsRemoved | array | Words removed by the stop-word filter |
💰 How much does it cost to convert text to slugs?
This actor uses Pay-Per-Event (PPE) pricing — you only pay for what you use.
| Event | FREE tier | BRONZE (Starter) | SILVER (Scale) | GOLD (Business) |
|---|---|---|---|---|
| Run started (one-time) | $0.005 | $0.005 | $0.005 | $0.005 |
| Per slug generated | $0.00115 | $0.001 | $0.00078 | $0.0006 |
Example costs (Starter plan — $0.001/slug):
- 100 slugs: ~$0.11 (start + 100 × $0.001)
- 1,000 slugs: ~$1.01
- 10,000 slugs: ~$10.01
- 100,000 slugs: ~$100.01
Higher-tier plans get additional volume discounts — DIAMOND users pay just $0.00028/slug.
All runs include a free tier — new Apify accounts get $5 in free platform credits, enough to generate ~4,300 slugs at no charge (FREE tier pricing).
🚀 How to use it (step by step)
- Open the actor on the Apify Store and click Try for free.
- Paste your texts into the "Texts to convert" field — one per line, or as a JSON array.
- Choose a separator (hyphen is the default and most common for URLs).
- Enable options as needed: lowercase (default on), stop-word removal, max length.
- Click Start — results appear in the dataset within seconds.
- Export as JSON, CSV, or XLSX from the dataset view.
For automation, use the Apify API or connect via MCP.
⚙️ Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
texts | array of strings | (required) | List of text strings to convert. Each produces one output row. |
separator | string | "-" | Word separator: -, _, or . |
lowercase | boolean | true | Convert output to lowercase. Recommended for all URLs. |
locale | string | "" | BCP 47 locale for transliteration hints (e.g., "de", "fr", "tr"). Leave blank for generic. |
maxLength | integer | 0 | Maximum slug length in characters. 0 = unlimited. Truncation happens at a word boundary. |
removeStopWords | boolean | false | Strip common English stop words (a, the, and, or, in, of, …). |
customStopWords | array of strings | [] | Additional words to strip, in any language. |
deduplicate | boolean | false | Skip duplicate input texts (one output per unique text). |
📦 Output examples
Basic conversion
Input:
{"texts": ["Hello, World! This is a Test"],"separator": "-","lowercase": true}
Output:
{"index": 0,"text": "Hello, World! This is a Test","slug": "hello-world-this-is-a-test","characterCount": 26,"wordCount": 6,"wasTruncated": false,"stopWordsRemoved": []}
With stop-word removal
Input:
{"texts": ["The Best Guide to URL Slugs for SEO"],"removeStopWords": true}
Output:
{"index": 0,"text": "The Best Guide to URL Slugs for SEO","slug": "best-guide-url-slugs-seo","characterCount": 24,"wordCount": 5,"wasTruncated": false,"stopWordsRemoved": ["the", "to", "for"]}
With max length
Input:
{"texts": ["A Very Long Title That Should Be Truncated After a Certain Point"],"maxLength": 30}
Output:
{"index": 0,"text": "A Very Long Title That Should Be Truncated After a Certain Point","slug": "a-very-long-title-that-should","characterCount": 29,"wordCount": 6,"wasTruncated": true,"stopWordsRemoved": []}
International / accented text
Input:
{"texts": ["Café au Lait & Crêpes", "Über den Wolken", "Ñoño y más ñoño"]}
Output:
[{ "index": 0, "slug": "cafe-au-lait-and-crepes", ... },{ "index": 1, "slug": "uber-den-wolken", ... },{ "index": 2, "slug": "nono-y-mas-nono", ... }]
💡 Tips and best practices
- Keep slugs short — enable
removeStopWordsand setmaxLength: 60for SEO-friendly URLs under most CMS character limits. - Use hyphens, not underscores — Google treats hyphens as word separators but underscores as connectors. Stick with
-for blog posts and product pages. - Test your locale — if you're processing German or Turkish text, set
localeto"de"or"tr"for correct transliteration (e.g.,ü → uein German context). - Use
customStopWordsfor brand names, common short words specific to your niche, or words that add no SEO value in your content category. - Deduplication for catalog imports — enable
deduplicate: truewhen processing a product catalog that may have repeated names to avoid duplicate URL conflicts. - Batch everything in one run — up to 100,000 texts per run is practical. There's no throttling or pagination overhead for pure computation.
🔌 Integrations
WordPress / WooCommerce bulk migration
Export post titles from WordPress (wp post list --fields=ID,post_title --format=csv), convert slugs with this actor, then import back with wp post update {ID} --post_name={slug}. Automate the loop via n8n.
Contentful / Strapi CMS pipeline
Add a "slug" field to your content type. Build a Make.com scenario: new entry created → send title to this actor via API → write returned slug back to the entry. Fully automated, zero developer involvement after setup.
E-commerce product feeds
When ingesting supplier product feeds (CSV/XML), run titles through this actor before inserting to your database. Guarantees all product URLs are consistent, even when supplier titles change capitalization or punctuation between feed updates.
Shopify collection slugs
Shopify calls these "handles". Use this actor in a Zapier workflow: new collection created → generate handle → update via Shopify Admin API. Keeps your SEO-friendly URL conventions consistent across the whole store.
Static site generators (Jekyll, Hugo, 11ty)
Pre-generate slugs for your content pipeline. Run this actor on your content spreadsheet before pushing to your repo, then use the slugs directly as file names ({slug}.md).
🛠 API usage
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });const run = await client.actor('automation-lab/text-to-slug-generator').call({texts: ['Hello World! This is a Test','Café au Lait & Crêpes','10 Best SEO Tips for 2024',],separator: '-',lowercase: true,removeStopWords: false,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);// [{ slug: 'hello-world-this-is-a-test', ... }, ...]
Python
from apify_client import ApifyClientclient = ApifyClient(token="YOUR_API_TOKEN")run = client.actor("automation-lab/text-to-slug-generator").call(run_input={"texts": ["Hello World! This is a Test","Café au Lait & Crêpes","10 Best SEO Tips for 2024",],"separator": "-","lowercase": True,"removeStopWords": False,})items = client.dataset(run["defaultDatasetId"]).list_items().itemsfor item in items:print(item["slug"])
cURL
curl -X POST \"https://api.apify.com/v2/acts/automation-lab~text-to-slug-generator/runs?token=YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"texts": ["Hello World! This is a Test","Café au Lait & Crêpes"],"separator": "-","lowercase": true}'
🤖 MCP — AI assistant integration
Connect Text to Slug Generator directly to Claude, Cursor, or any MCP-compatible AI assistant and convert slugs with a natural language prompt.
Claude Code (terminal)
$claude mcp add --transport http apify "https://mcp.apify.com"
Claude Desktop / Cursor / VS Code
Add to your MCP config:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com"}}}
Your AI assistant will use OAuth to authenticate with your Apify account on first use.
Example prompts
- "Generate URL slugs for these 20 blog post titles: [paste titles]"
- "Convert these product names to underscored slugs with stop words removed"
- "Create slugs for these French article titles with locale set to fr"
- "Process this CSV of 500 titles and give me back a table with original and slug columns"
⚖️ Legality and data usage
This actor performs pure local computation — it does not make any HTTP requests to external websites, does not scrape any service, and does not use any proxies. All processing happens inside the actor runtime using only the input you provide.
- No terms of service concerns — no websites are accessed.
- No personal data collected — the actor only processes the strings you provide and returns them transformed.
- GDPR-safe — input and output data are stored only in your own Apify dataset, under your account.
❓ FAQ
Q: What happens to non-Latin characters (Chinese, Arabic, Cyrillic, Korean)?
A: All Unicode characters are transliterated to ASCII using the any-ascii library, which covers 100+ scripts. Chinese → Pinyin romanization, Japanese Kana → Romaji, Korean Hangul → Revised Romanization, Arabic → consonant romanization, Cyrillic → Latin equivalents. These are phonetically approximate and perfect for URL slugs.
Q: Does it preserve numbers in slugs?
A: Yes. Numbers are kept as-is. "Top 10 Tips" → "top-10-tips".
Q: Can I use it with underscores for Python package names?
A: Yes — set separator: "_".
Q: The slug is empty after stop-word removal — why?
A: If your text consists entirely of stop words (e.g., "The And Or"), the actor falls back to the full word list and won't produce an empty slug.
Q: I have 1 million titles. Will it time out? A: The default timeout is 300 seconds. At ~10,000 slugs/second processing speed, you can safely process ~1–2 million titles per run. For larger batches, split into multiple runs or contact us for guidance.
Q: The slug for my German text looks wrong (ü became u, not ue).
A: The any-ascii library maps German ü→u, ö→o, ä→a — standard ASCII transliteration. The locale field is stored in output metadata but does not change any-ascii behavior. For locale-specific conventions (e.g., German ü→ue), pre-process your text with a specialized tool before passing to this actor.
Q: How do I export results as a CSV?
A: After the run, open the dataset tab and click Export → CSV. You can also use the Apify API: GET /v2/datasets/{id}/items?format=csv.
🔗 Related actors
- Base64 Converter — Encode and decode Base64 strings in bulk.
- JSON Schema Generator — Generate JSON Schema from sample JSON objects automatically.
- Color Contrast Checker — Validate WCAG 2.1 AA/AAA color contrast ratios in bulk.
- Accessibility Checker — Audit web pages for WCAG accessibility issues.
- Ads.txt Checker — Validate ads.txt files for programmatic advertising compliance.