Skip to content

URL Encoder and Decoder

Takes about a minute. You hear back from me personally.

Prefer Saad Raza SEO on Google Add this site as a preferred source and Google will show more of my SEO and AI search guides when you search.

Add saadrazaseo.com as a preferred source on Google
Free tool

Runs in your browser. Nothing you enter is uploaded or stored.

Loading the tool...

To encode or decode a URL, paste it into the free URL Encoder and Decoder above and choose Encode or Decode. It converts spaces, ampersands, accented letters and other unsafe characters to percent-encoding (and back), in one of three styles: component encoding for a single value, full-URL encoding that keeps the address structure, or form style with plus signs for spaces. Paste a list to convert up to 5,000 lines at once, see which lines are invalid, and when you paste one full URL it also splits it into scheme, host, path and query parameters.

Last updated: 11 November 2026. Written by Saad Raza.

Key takeaways

  • URLs can contain only a limited set of characters. Everything else, including spaces, accents, emoji and symbols with special meaning, must be percent-encoded: a % sign followed by two hex digits for each byte of the character’s UTF-8 form.
  • Encode a single value, such as a search term in a query string, with component encoding. Encode a whole address with full-URL encoding so that the slashes, question marks and equals signs survive.
  • Decode once. Decoding an already-decoded string, or decoding twice, can change its meaning, and a stray percent sign makes decoding fail.
  • Encoding errors in links cause broken pages, failed redirects, wrong analytics data and duplicate URLs in the index.
  • The tool runs in your browser. URLs with tokens, emails or customer data in them are not uploaded.

What percent-encoding is and why it exists

A URL is a string made of a small safe alphabet: letters, digits and a few symbols such as hyphen, underscore, period and tilde. Other characters either have a job in the structure of the address, for example the question mark that starts a query string, or are not allowed at all. To include such a character as data, you replace it with a percent sign and the hexadecimal value of each of its bytes. A space becomes %20. An ampersand becomes %26, so that it is not mistaken for the separator between parameters. The letter é is two bytes in UTF-8 and becomes %C3%A9.

Browsers hide much of this. You may type a space in the address bar and the browser quietly sends %20. But the moment a URL is built by a script, a template, a spreadsheet or a person, mistakes appear. A search term with an ampersand breaks a query string. A path with a space is cut at the space in an email. A link copied from a document turns into a string of percent codes. Knowing how to encode and decode precisely is the fix.

How to use the URL Encoder and Decoder

  1. Paste your text or URLs, one per line.
  2. Choose Encode or Decode.
  3. Choose the style. Component encodes everything except letters, digits and the characters – _ . ~ ! * ‘ ( ). Full URL leaves the characters that structure an address, such as : / ? # & and =, unencoded. Form style is component encoding with spaces shown as a plus sign, as an HTML form submits them; when decoding, plus signs are turned back into spaces.
  4. Press Convert. Copy the result or download it. Any line that cannot be converted is listed with the reason.
  5. If you pasted a single full URL, read the extra tables below the result: the URL broken into its parts, and the query parameters with their decoded values.

Which style to choose

StyleUse it forExample
ComponentOne value going into a path segment or a query parameter“seo tools & tips” becomes seo%20tools%20%26%20tips
Full URLA whole address with spaces or accents in ithttps://x.com/a b?q=é becomes https://x.com/a%20b?q=%C3%A9
Form styleData sent as application/x-www-form-urlencodedseo tools becomes seo+tools

The most common error is using full-URL encoding on a value that contains an ampersand or an equals sign. Those characters are left alone, so they break the query string. If you are encoding a piece of data, use component encoding.

A worked example

The example has three lines. The first is https://example.com/search?q=seo tools&lang=en. With component encoding it becomes https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dseo%20tools%26lang%3Den, which is the right form if the whole address is itself being passed as the value of another parameter, for example in a redirect or a share link. The second line, “restaurant in Karachi & Lahore”, becomes restaurant%20in%20Karachi%20%26%20Lahore, safe inside a query string. The third, “café crème brûlée”, becomes caf%C3%A9%20cr%C3%A8me%20br%C3%BBl%C3%A9e, where each accented letter is two bytes.

The decode example reverses these, and adds a fourth line, 100%, which is invalid because the percent sign is not followed by two hex digits. The tool does not crash or guess. It marks that line with an error and converts the rest, so one bad line in a list of thousands does not stop the job.

Understanding a URL’s parts

When you paste one full address and press Convert, the tool shows its structure. For https://user@example.com:8080/a/b?q=seo%20tools&x=1#top it lists the scheme (https), host (example.com), port (8080), path (/a/b), query string (?q=seo%20tools&x=1) and fragment (#top), and then each query parameter with its decoded value: q is “seo tools” and x is 1. This is a fast way to see what a tracking link really carries, to spot a parameter that should not be there or to check that UTM values are what you intended. The UTM bulk builder creates such links in volume, and this tool is how you inspect one.

Why URL encoding matters for SEO

  • Duplicate URLs. The same page reachable as /café and /caf%C3%A9 is fine, since they are the same address, but a mix of encoded and mis-encoded variants such as upper and lower case hex (%c3 and %C3) can create separate URLs in logs and crawl data. Keep one consistent form.
  • Slugs. Avoid spaces, accents and symbols in your page addresses. Plain lower-case words separated by hyphens are the easiest to share and read. The SEO slug generator creates them.
  • Redirects. When you write redirect rules, special characters in the old address must be matched in their encoded form. Check the result with the redirect checker and build rules with the htaccess redirect generator.
  • Sitemaps. URLs in an XML sitemap must be properly encoded, and ampersands must be escaped as & in the XML. See the XML sitemap generator and the sitemap validator.
  • International sites. Non-English URLs are legitimate, and search engines handle them, but they appear encoded when copied. The hreflang generator expects absolute, correctly encoded addresses.
  • Tracking parameters. Encode the values of campaign parameters so that a space or ampersand in a campaign name does not split the data into several parameters.

Common mistakes

Double encoding is the commonest. If a value is encoded twice, the percent sign itself becomes %25, so a space shows as %2520. Decode once, check the result and decode again only if it is still encoded. Mixing styles is next: a plus sign means a space only in form-style query strings, and in a path it is a literal plus. Decoding a path with the form style turns real plus signs into spaces. The third is encoding the whole URL with component encoding when you only meant to encode a value, which turns the slashes and colon into %2F and %3A and leaves an address that no browser will open.

Also watch for characters that look harmless. An apostrophe, parenthesis or asterisk is allowed in component encoding as the standard function leaves them alone, but some systems expect them encoded. If a link fails only on those, encode them by hand. For text rather than URLs, the Base64 encoder and decoder is the tool for data that must travel inside a URL as a single safe string. If you suspect a site has URL problems at scale, such as many redirect chains or duplicate parameters, a technical SEO audit finds them.

Limits

The tool uses the standard JavaScript encoding and decoding functions, so results follow the common web convention, which differs slightly from older standards on a few characters. It treats each line as a separate string and does not fetch the URL or test that it works. The URL breakdown handles addresses with a scheme and host, and does not handle relative links, internationalised domain names in their Unicode form or IPv6 addresses with unusual syntax. Up to 5,000 lines per run, processed in your browser; nothing is sent to a server.

Questions about the URL Encoder and Decoder

What does %20 mean in a URL?

It is a space. A percent sign followed by two hex digits stands for one byte, and 20 in hexadecimal is the space character.

What is the difference between encodeURI and encodeURIComponent?

encodeURI, shown as full-URL encoding, leaves characters such as : / ? # & = alone because they structure an address. encodeURIComponent, shown as component encoding, encodes them, which is correct for a single value.

Why does my decoded text show an error?

A percent sign must be followed by two hex digits, and the bytes must form valid UTF-8. A stray percent sign, such as in “100%”, breaks decoding, so encode it as %25 first.

Should my page URLs contain special characters?

It is best to avoid them. Use lower-case letters, numbers and hyphens, which are easy to read, share and link without encoding.

Does this tool store my URLs?

No. Everything is processed in your browser, so links containing tokens or personal data are not uploaded.

If you want help finding and fixing URL problems across a whole site, see my SEO services or ask for a free audit. You can also browse the other free technical SEO tools.

Got your results? Let’s turn them into a plan

Tools show the issues. I will tell you which ones matter most and how to fix them.

Your details are only used to reply to your request. No spam.

Grow my trafficCall