Should a space be encoded as %20 or +?
In paths and in modern APIs, use %20. The + form comes from HTML form submissions (application/x-www-form-urlencoded), where servers decode + as a space in the query string. Because + is ambiguous, encoding a literal plus sign as %2B avoids surprises.
Why is my URL encoded twice, with %2520 in it?
%25 is the encoded percent sign, so %2520 is an already-encoded %20 that was encoded again. This happens when a value passes through two layers that each encode it. Decode once to check, and make sure only one layer in your code is responsible for encoding.
What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves characters such as :, /, ?, & and = alone so a complete URL keeps working. encodeURIComponent escapes them too, which is right for a single value. This tool matches encodeURIComponent, the safer choice for building query strings.
How are non-English characters encoded?
They are first converted to UTF-8 bytes, and each byte is written as %XX. That is why one character such as "ü" turns into two sequences, %C3%BC, and many emoji turn into four.
Which characters never need encoding?
The unreserved characters are always safe: the letters A to Z and a to z, the digits 0 to 9, and the four symbols hyphen, period, underscore and tilde. Every other character is either reserved for URL structure, such as / ? # & and =, or must be percent-encoded when it appears inside a value.
Is a URL with encoded characters bad for SEO?
No. Search engines decode URLs and treat %C3%A9 and é as the same address. For readability, many sites still prefer short lowercase slugs with hyphens, which avoid encoding altogether and are easier to share.