na.to.
📚 All keywords › 🧰 Free Web Tools › URL Encoding: Why Korean Addresses Turn into %EC…
KO EN
🔗

URL Encoding: Why Korean Addresses Turn into %EC…

Percent-encoding turns characters not allowed in URLs into % and hex digits. Why Hangul becomes %ED%95%9C, %20 vs +, and encodeURI vs encodeURIComponent.

📚 Free Web Tools · 19/52· ⏱ About 4min read ·Information updated 2026-11-03
📋 Key facts5
Standard
Percent-encoding in RFC 3986 (January 2005)
Left as is
Latin letters, digits and - . _ ~
Hangul
3 bytes in UTF-8, so three %XX groups
Space
%20, or + in form-encoded data
Korean domains
Not percent-encoded but Punycode starting with xn--

Only certain characters may appear in a URL

RFC 3986, which defines URL syntax, limits the characters that can appear as is to upper- and lowercase Latin letters, digits, hyphen (-), dot (.), underscore (_) and tilde (~). Symbols such as /, ?, &, = and # are reserved as delimiters that divide the parts of an address. Characters outside this range, such as Hangul or spaces, or delimiters you want to use as plain characters, must be converted with percent-encoding.

How percent-encoding works

Percent-encoding turns a character into bytes and writes each byte as % followed by two hexadecimal digits. Hangul is first converted to UTF-8, where one syllable is 3 bytes, so it gets three %XX groups. For example, 한 becomes %ED%95%9C and 글 becomes %EA%B8%80. That is why copying an address containing a Korean search term gives a %EC… string much longer than the original text. The address bar may show Hangul, but the encoded form is what is actually sent to the server.

  • 한 → %ED%95%9C
  • 글 → %EA%B8%80
  • space → %20
  • & → %26, = → %3D, ? → %3F

Is a space %20 or +?

Under RFC 3986 a space is %20. However, the application/x-www-form-urlencoded format used when submitting web forms writes spaces as + in the query part after the question mark. That is why search result URLs often have + where the spaces were. Conversely, when you need to send an actual + character, encode it as %2B so it is not read as a space. This site's URL encoder treats + as a space when decoding.

encodeURI and encodeURIComponent

JavaScript has two encoding functions. encodeURI is for a whole address, so it leaves delimiters such as :, /, ?, &, = and # unchanged. encodeURIComponent is for one piece of an address, such as a search term or a single parameter value, so it encodes those delimiters too. If a search term contains & and you use encodeURI, everything after the & is cut off as a separate parameter, so use encodeURIComponent for values. This site's encoder works like encodeURIComponent and encodes the whole input as a single value.

Watch for double encoding

Encoding an already encoded string again turns % itself into %25, so %20 becomes %2520. If an address looks garbled or the server receives the wrong search term, double encoding is worth suspecting. If %25 is still visible after decoding once, decode again and see whether the original text appears. A string where % is not followed by two hexadecimal digits is not valid encoding and cannot be decoded.

Korean domain names work differently

Hangul in the domain name part of an address is not percent-encoded; under internationalized domain name (IDN) rules it is converted to Punycode. A domain converted to Punycode becomes a string of Latin letters and digits starting with xn--. So a Korean domain and a Korean path or search term are converted in different ways, and you should not run a domain through a URL encoder.

A different character set breaks the text

Percent-encoding in web addresses today is mostly based on UTF-8, but some older sites use addresses encoded in EUC-KR. In EUC-KR a Hangul syllable is 2 bytes, so it gets only two %XX groups, and decoding it as UTF-8 produces garbled text. If decoding gives strange symbols, first find out which character set the original address used.

Summary

URL encoding is packaging that carries characters URLs cannot hold.

  • Hangul is 3 bytes in UTF-8, so three %XX groups
  • A space is %20, or + in form data
  • Use encodeURIComponent for a single value
  • If you see %25, suspect double encoding
  • Korean domains become Punycode (xn--) separately

🔗 More in this category

🧰 Related tools

🌍 Search the web for this

Each button runs this keyword on that search engine