How URL Encoding Works
Paste any text and this tool percent-encodes it for safe use inside a URL. Spaces become %20, ampersands become %26, and characters outside the safe ASCII set are converted to their UTF-8 byte sequences. The result updates as you type.
URL encoding exists because URLs have a restricted character set. Only letters, digits and a handful of symbols are safe to use literally; everything else has to be represented as a percent sign followed by its hexadecimal byte value.
Why encoding is necessary
Certain characters have structural meaning inside a URL. A question mark starts the query string, an ampersand separates parameters, a hash starts a fragment, and a slash separates path segments. If your data contains any of those characters literally, the URL breaks in a way that is often silent.
The classic failure is a search query containing an ampersand. A link to /search?q=shoes&socks is parsed as two parameters — q=shoes and socks — and your search page receives only “shoes”. Encoded as /search?q=shoes%26socks, the whole string arrives intact as one value.
Spaces are the other common case. Unencoded spaces break links when copied into plain-text contexts like emails, where the address is truncated at the first space. Encoded as %20, the URL survives being pasted anywhere.
Which characters get encoded
- Always safe, never encoded: A–Z, a–z, 0–9, and the characters - _ . ! ~ * ' ( )
- Reserved characters that must be encoded when used as data: ; / ? : @ & = + $ , #
- Space becomes %20 in paths and query values.
- Non-ASCII characters — accented letters, Arabic, Chinese, emoji — are converted to UTF-8 bytes, so a single character often becomes several percent-escapes.
Encoding and SEO
For URL slugs, the best encoding is none. A slug containing encoded characters is harder to read, harder to share, and less appealing in search results where the URL is displayed. /best-running-shoes reads well; /best%20running%20shoes does not.
The practical rule is to design slugs from the safe character set in the first place — lowercase letters, digits and hyphens — rather than encoding whatever the page title happened to be. The URL Slug Generator does exactly this conversion.
Encoding belongs in query strings and parameter values, where arbitrary data has to travel safely. That is where this tool earns its place: campaign values, search terms, and filter parameters that might contain spaces or symbols.
Non-English URLs and IDNs
URLs containing non-ASCII characters are legal and widely supported. Browsers display them in readable form and encode them behind the scenes, so a URL with Arabic or Chinese characters in the path works fine and often looks better to a native-language audience than a transliterated version.
The two things to watch are consistency and portability. The encoded form is what gets stored in analytics, logs and sitemaps, so reports become harder to read. And older systems occasionally mangle encoded UTF-8 sequences.
Domain names work differently again. Internationalised domain names are encoded with Punycode rather than percent-encoding, producing the xn-- prefixes you sometimes see. That conversion is separate from what this tool does.
Common encoding mistakes
- Double-encoding — running already-encoded text through an encoder again, turning %20 into %2520 and breaking the value.
- Encoding the whole URL including the protocol and slashes, which produces a string no browser can resolve.
- Encoding the slug rather than designing a clean one, giving you ugly URLs that are technically valid.
- Forgetting to encode user-supplied values inserted into query strings, which breaks on the first ampersand someone types.
- Assuming a plus sign means a space. It does in form submissions, but %20 is the correct encoding in a path.
Going the other way
To read an encoded URL, the URL Decoder converts it back to plain text — useful when debugging a redirect chain or working out what a tracking URL actually contains.
If you are inspecting a URL's parameters rather than the whole string, the URL Parameter Extractor splits the query string into a decoded key-value table, which is usually faster than decoding by eye.
Frequently asked questions
When do I need to URL-encode something?
Whenever you insert arbitrary data into a URL — a search term, a campaign value, a filename — and that data might contain spaces, ampersands, question marks or other reserved characters. Slugs are the exception: design those from safe characters instead.
What does %20 mean?
It is an encoded space. The percent sign signals an escape sequence and 20 is the hexadecimal byte value for a space character. Encoding is why URLs containing spaces survive being pasted into emails and chat.
Should my page URLs contain encoded characters?
Ideally not. Encoded slugs are harder to read and share, and look worse in search results. Build slugs from lowercase letters, digits and hyphens instead — encoding belongs in query string values, not in paths.
What is double-encoding and why is it a problem?
It happens when already-encoded text is encoded again, so %20 becomes %2520 — the percent sign itself gets escaped. The receiving server then decodes it once and gets %20 as literal text rather than a space, and the value is wrong.
Is a plus sign the same as %20?
Only in the query string of form submissions, where a plus historically represents a space. In a URL path, a plus is a literal plus sign and %20 is the correct space encoding. This tool uses %20.