FreeSEOTools.io
🔗
FreeDeveloper Tools

URL Encoder & Decoder

Percent-encode any URL or text using encodeURIComponent or encodeURI, or decode any percent-encoded string back to readable text. 100% browser-based — nothing is sent to a server.

Encode URL / Text

0 chars
0 chars

Decode Percent-Encoded String

0 chars
0 chars

How to Use the URL Encoder & Decoder

The tool has two panels. The top panel encodes raw text or URLs into percent-encoded format. The bottom panel decodes percent-encoded strings back to their original form. Both panels update automatically as you type.

Encoding Mode: encodeURI vs encodeURIComponent

Use the toggle buttons at the top of the encode panel to switch between the two JavaScript encoding functions:

encodeURIComponent

Encodes everything except unreserved characters (A–Z, a–z, 0–9, -, _, ., !, ~, *, ', (, )). Use this for individual query parameter values, OAuth tokens, and any component that will be placed inside a URL.

encodeURI

Encodes a complete URL but leaves structural characters intact (: / ? # [ ] @ ! $ & ' ( ) * + , ; =). Use this when you have a full URL and want to make it safe for use in an href or location.href assignment.

URL Encoding and SEO

URL encoding has a direct impact on how search engines crawl, index, and consolidate your pages. Here are the key SEO considerations:

TopicBest Practice
Non-ASCII characters in URLsAlways encode non-ASCII (e.g. accented letters, CJK) in URL paths using UTF-8 percent-encoding. Google can index punycode domains but prefers encoded paths.
Spaces in URLsNever use literal spaces. Use %20 in paths. In query strings, + is also accepted but %20 is unambiguous.
Canonical tagsEnsure canonical URLs use consistent encoding. A URL with %20 and one with + in the same path are technically different.
RedirectsWhen redirecting, preserve encoding. A 301 that changes encoding may cause duplicate content issues.
Sitemap URLsAll URLs in sitemaps must be XML-escaped and properly percent-encoded. & in query strings should be & in XML.
HreflangHreflang href values must be absolute URLs with consistent encoding across all language variants.

Common URL Encoding Examples

CharacterEncodedNotes
Space%20Most common encoding issue
&%26Common in query strings
+%2BPlus sign; + in query strings = space
=%3DKey-value separator in query strings
?%3FQuery string delimiter
#%23Fragment identifier
/%2FPath separator — only encode in values
@%40Used in email addresses

Decoding Percent-Encoded URLs

The decode panel uses JavaScript's decodeURIComponent() to reverse percent-encoding. This is useful when you receive a URL from a log file, an API response, or a browser address bar and want to read it in plain text. If the input contains an incomplete sequence (e.g. a lone %), the tool will show an error rather than silently producing incorrect output.

Frequently Asked Questions

What is URL encoding (percent-encoding)?

URL encoding, also known as percent-encoding, converts characters that are not allowed in URLs into a safe format. Each unsafe character is replaced by a percent sign (%) followed by two hexadecimal digits representing its UTF-8 byte value. For example, a space becomes %20, and an ampersand & becomes %26. This allows arbitrary data to be transmitted safely in URLs.

What is the difference between encodeURI and encodeURIComponent?

encodeURI is designed to encode a complete URL. It leaves URL structural characters intact (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) because they have meaning in a full URL. encodeURIComponent encodes everything except unreserved characters (A-Z a-z 0-9 - _ . ! ~ * ' ( )). Use encodeURIComponent for individual query parameter values and encodeURI for complete URLs.

When should I use URL encoding in SEO?

URL encoding matters for SEO when your URLs contain non-ASCII characters (like accented letters or CJK characters), spaces, or special characters. Search engines can index percent-encoded URLs, but human-readable URLs are preferred. Always encode query parameter values with encodeURIComponent. For canonical URLs, ensure consistent encoding — Google treats %20 and + as different in paths.

Does this tool send my data to a server?

No. All encoding and decoding is performed entirely in your browser using JavaScript's built-in encodeURIComponent() and decodeURIComponent() functions. Your input is never sent to any server, making this tool safe for encoding sensitive data such as API keys or passwords in URLs.

Related Tools

Need a Full Technical SEO Audit?

Our SEO experts audit URL structure, canonicals, redirects, and more to build a comprehensive technical health report for your site.

Get a Free SEO Audit