URL Encoder & Slug Converter
Encode and decode URLs, convert text to clean SEO slugs. Runs in your browser with no server calls or data tracking.
URL Encoder & Slug Converter
Runs entirely in your browser — no server calls, no tracking.
Enter text and click Convert.
🔒 Your data never leaves this tab. This tool has no backend.
About the URL Encoder & Slug Converter
URL encoding converts characters that are not safe to include in a URL (spaces, ampersands, special characters) into a percent-encoded format browsers can parse. Slug generation does the opposite — it takes a phrase like a blog title and converts it to a lowercase, hyphenated string safe for use as a URL path segment. Both operations run here without any server call.
Slug best practices for SEO
Good slugs are short, lowercase, and hyphenated. They include the target keyword and drop stop words (the, a, and, for). A slug like /blog/custom-software-development-cost-2026 outperforms /blog/post?id=452&title=Custom+Software+Development+Cost+in+2026 for both human readability and Google's ability to understand the page topic from the URL alone.
When to encode vs not encode
Encode user-supplied input before inserting it into a URL query string to prevent injection. Do not encode the entire URL — only the parameter values. Path segments use a slightly different encoding than query parameters; encodeURIComponent encodes everything except letters, digits, and -_.!~*'() which is appropriate for query values.
This tool handles Unicode correctly: it strips diacritics before slugifying, so "Café au Lait" becomes cafe-au-lait rather than failing or producing encoded characters in the slug.
What makes a good URL slug
A slug is the human-readable part of a URL that identifies a page. It is a small piece of text that has a disproportionate effect on how a page is shared, indexed and maintained.
| Do | Avoid |
|---|---|
| Lower case throughout | Mixed case — breaks on case-sensitive servers |
| Hyphens between words | Underscores and %20 spaces |
| 3–6 meaningful words | The entire page title |
| ASCII characters | Accents and emoji — they percent-encode |
| A stable slug | Dates or version numbers that will age |
Hyphens, not underscores
Google has long treated hyphens as word separators and underscores as joiners, so vat-calculator reads as two words while vat_calculator can read as one. Hyphens are also the established convention, so they simply look right to people scanning a link.
Accented and non-Latin characters
Characters outside ASCII get percent-encoded in a URL, turning a readable slug into an unreadable string when copied and pasted. The usual approach is transliteration: café becomes cafe, München becomes munchen. This converter transliterates rather than stripping, so words stay recognisable.
Stop words and length
Dropping a, the, of and similar keeps slugs short without losing meaning — but not when removal changes the sense. Aim for three to six words: long enough to describe the page, short enough to read in a search result or a chat message.
Changing a slug later
A live URL is a promise. If you must change one, add a 301 redirect from the old slug to the new one, or you lose the accumulated ranking signals and break every existing link to the page.
Frequently asked questions
It is the readable part of a URL that identifies a specific page — in example.com/blog/vat-calculator-guide, the slug is vat-calculator-guide. A good slug is lower case, hyphen-separated, three to six words long, and describes the page content in plain language.
Hyphens. Google treats hyphens as word separators and underscores as joiners, so vat-calculator reads as two words while vat_calculator can be read as one. Hyphens are also the established convention, so links look right to people scanning them.
They get percent-encoded, which turns a readable slug into an unreadable string when copied and pasted. The standard fix is transliteration — café becomes cafe, München becomes munchen — which keeps the word recognisable. This converter transliterates rather than deleting the characters.
Three to six meaningful words is the sweet spot: descriptive enough to be useful, short enough to read in a search result or a chat message. Dropping stop words like a, the and of is fine as long as the meaning survives.
You can, but add a 301 redirect from the old slug to the new one. Without it you lose the ranking signals the old URL accumulated and break every existing link, bookmark and share. Treat a published URL as a commitment.
encodeURI is for encoding a complete URL — it leaves characters like /, ?, #, and & intact because they have structural meaning in a URL. encodeURIComponent encodes everything except alphanumerics and a few safe characters, making it correct for encoding individual query parameter values.sanitize_title follows the same broad approach./search?q=custom%20software%20development%20uk.Need a custom web app or CMS built?
ruxox builds production-grade software for growing businesses. Free scoping estimate in 48 hours.