ruxox
Start
Start
URL / Slug

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 this tool

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.

Slug rules

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.

DoAvoid
Lower case throughoutMixed case — breaks on case-sensitive servers
Hyphens between wordsUnderscores and %20 spaces
3–6 meaningful wordsThe entire page title
ASCII charactersAccents and emoji — they percent-encode
A stable slugDates 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.

FAQ

Frequently asked questions

What is a URL slug?

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.

Should a slug use hyphens or underscores?

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.

How do accented characters work in a URL slug?

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.

How long should a URL slug be?

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.

Can I change a URL slug after publishing?

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.

What is the difference between encodeURI and encodeURIComponent?
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.
Why does my slug tool produce different results from WordPress?
Different slugifiers handle edge cases differently: apostrophes (drop vs encode), numbers-only slugs, consecutive hyphens, and Unicode normalisation. This tool follows the most common convention: lowercase, ASCII only, hyphens for separators, strip leading and trailing hyphens. WordPress's sanitize_title follows the same broad approach.
Can I use this to decode encoded URLs from server logs?
Yes — paste the percent-encoded URL into the input, choose Decode, and the tool returns the human-readable version. Useful for reading log entries like /search?q=custom%20software%20development%20uk.
Custom software

Need a custom web app or CMS built?

ruxox builds production-grade software for growing businesses. Free scoping estimate in 48 hours.

Free project estimateNo obligation · reply in 48h
Get estimate