--- id: html-url-encode title: "HTML URL Encode" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["URL encoding", "percent encoding", "URL", "Uniform Resource Locator", "URL schemes", "ASCII URL encoding"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.88 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["html", "web", "frontend", "url", "encoding", "w3schools"] raw_sources: ["https://www.w3schools.com/html/html_urlencode.asp"] applied_in: [] github_commit: "" --- # [[HTML URL Encode]] ## ๐ŸŽฏ ํ•œ ์ค„ ํ†ต์ฐฐ (One-line insight) A URL (Uniform Resource Locator) is a web address that can only be sent over the Internet using the ASCII character set, so non-ASCII characters are **URL-encoded** โ€” replaced by a `%` followed by hexadecimal digits (and spaces by `+` or `%20`). [S1] ## ๐Ÿง  ํ•ต์‹ฌ ๊ฐœ๋… (Core concepts) - **URL** โ€” a Uniform Resource Locator is a web address used to request pages from web servers. [S1] - **URL syntax** โ€” a URL follows the structure `scheme://prefix.domain:port/path/filename`. [S1] - **Schemes** โ€” the type of Internet service (http, https, ftp, file). [S1] - **Why encoding is needed** โ€” URLs can only be sent over the Internet using the ASCII character set; characters outside ASCII must be encoded. [S1] - **Encoding scheme** โ€” non-ASCII characters become `%` + hexadecimal digits; spaces become `+` or `%20`. [S1] - **Default charset** โ€” the default character set in HTML5 is UTF-8. [S1] ## ๐Ÿงฉ ์ถ”์ถœ๋œ ํŒจํ„ด (Extracted patterns) - **URL syntax pattern** โ€” `scheme://prefix.domain:port/path/filename`. [S1] - **Percent-encoding pattern** โ€” `%HH` where `HH` is the hexadecimal value of the byte (e.g. `%20` for a space). [S1] - **Space encoding** โ€” `+` or `%20`. [S1] - **Multi-byte UTF-8 encoding** โ€” one character may expand to several `%HH` pairs (e.g. ยฉ โ†’ `%C2%A9` in UTF-8). [S1] ## ๐Ÿ“– ์„ธ๋ถ€ ๋‚ด์šฉ (Details) **URL โ€” Uniform Resource Locator** A URL is a web address used to request pages from web servers. The basic syntax is: [S1] ``` scheme://prefix.domain:port/path/filename ``` Syntax components: [S1] | Component | Meaning | |---|---| | `scheme` | The type of Internet service (http or https are most common) | | `prefix` | The domain prefix (default for http is `www`) | | `domain` | The Internet domain name (e.g. `w3schools.com`) | | `port` | The port number at the host (default for http is `80`) | | `path` | The path at the server (root directory if omitted) | | `filename` | The name of the document or resource | **Common URL Schemes** [S1] | Scheme | Short for | Used for | |---|---|---| | http | HyperText Transfer Protocol | Common web pages. Not encrypted | | https | Secure HyperText Transfer Protocol | Secure web pages. Encrypted | | ftp | File Transfer Protocol | Downloading or uploading files | | file | โ€” | A file on your computer | **URL Encoding** URLs can only be sent over the Internet using the ASCII character set. If a URL contains characters outside the ASCII set, it has to be converted. URL encoding replaces non-ASCII characters with a `%` followed by hexadecimal digits. URLs cannot contain spaces; a space is encoded with `+` or `%20`. The default character set in HTML5 is UTF-8. [S1] **ASCII Encoding Examples** [S1] | Character | From Windows-1252 | From UTF-8 | |---|---|---| | โ‚ฌ | %80 | %E2%82%AC | | ยฃ | %A3 | %C2%A3 | | ยฉ | %A9 | %C2%A9 | | ยฎ | %AE | %C2%AE | | ร€ | %C0 | %C3%80 | | ร | %C1 | %C3%81 | | ร‚ | %C2 | %C3%82 | | รƒ | %C3 | %C3%83 | | ร„ | %C4 | %C3%84 | | ร… | %C5 | %C3%85 | (Ten character mappings shown; the page references a complete URL encoding reference guide elsewhere.) [S1] ## ๐Ÿ› ๏ธ ์ ์šฉ ์‚ฌ๋ก€ (Applied in summary) The ASCII encoding examples above are the canonical applied case: converting characters such as ยฉ to `%C2%A9` (UTF-8) so they can travel safely inside a URL. No external project/commit applications found in the source. ## ๐Ÿ’ป ์ฝ”๋“œ ํŒจํ„ด (Code patterns) URL structure (syntax template): ``` scheme://prefix.domain:port/path/filename ``` Percent-encoded values (examples): ``` space -> %20 (or +) ยฉ -> %C2%A9 (UTF-8) โ‚ฌ -> %E2%82%AC (UTF-8) / %80 (Windows-1252) ``` ## โš–๏ธ ๋ชจ์ˆœ ๋ฐ ์—…๋ฐ์ดํŠธ (Contradictions & updates) No contradictions found in the source. Note that the same character encodes differently depending on the source character set (e.g. โ‚ฌ is `%80` from Windows-1252 but `%E2%82%AC` from UTF-8); HTML5's default UTF-8 governs modern encoding. [S1] ## โœ… ๊ฒ€์ฆ ์ƒํƒœ ๋ฐ ์‹ ๋ขฐ๋„ - **์ƒํƒœ:** draft - **๊ฒ€์ฆ ๋‹จ๊ณ„:** conceptual (์‹ค์ œ ์ ์šฉ ์‚ฌ๋ก€ ๋ฐœ๊ฒฌ ์‹œ applied/validated๋กœ ์Šน๊ฒฉ ๊ฐ€๋Šฅ) - **์ถœ์ฒ˜ ์‹ ๋ขฐ๋„:** B (W3Schools โ€” widely used educational reference, not a primary standards body) - **์‹ ๋ขฐ ์ ์ˆ˜:** 0.88 - **์ค‘๋ณต ๊ฒ€์‚ฌ ๊ฒฐ๊ณผ:** ์‹ ๊ทœ ์ƒ์„ฑ (New discovery) ## ๐Ÿ”— ์ง€์‹ ๊ทธ๋ž˜ํ”„ (Knowledge Graph) - **์ƒ์œ„/๋ฃจํŠธ:** [[HTML Tutorial]] - **๊ด€๋ จ ๊ฐœ๋…:** [[HTML Charsets]], [[HTML Symbols]], [[HTML Links]], [[HTML Forms]] - **์ฐธ์กฐ ๋งฅ๋ฝ:** Referenced when constructing or transmitting web addresses, especially query strings and links containing special characters. ## ๐Ÿ“š ์ถœ์ฒ˜ (Sources) - [S1] W3Schools โ€” HTML URL Encode โ€” https://www.w3schools.com/html/html_urlencode.asp ## ๐Ÿ“ ๋ณ€๊ฒฝ ์ด๋ ฅ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "HTML URL Encode" page (Astra wiki-curation, P-Reinforce v3.1 format).