HTML URL Encoding Last Updated : 22 Feb, 2025 Comments Improve Suggest changes Like Article Like Report A Uniform Resource Locator (URL) is simply the address of a website to access the website content. Web browsers retrieve pages from web servers using a URL (Uniform Resource Locator).What is URL Encoding?URL Encoding is the process of converting the URL into a valid format that is accepted by web browsers. Only certain characters are allowed to be used in the URL like alphabets A-Z and a-z, numbers 0-9, and a few special characters. They can be used as it is but the rest of the characters that are not in this list are used after encoding them to a suitable form.URL Encoding takes place by replacing all the characters that are not allowed by a % sign followed by two hexadecimal digits. These two hexadecimal values represent the numerical values of the character in the ASCII character set. For example, a space is not acceptable in a URL and is replaced by a '%20' or a '+' sign while encoding. Similarly, a $ sign is replaced by '%24'.URL SyntaxA web address follows these syntax rules:scheme://prefix.domain:port/path/filename//Examplehttps://www.geeksforgeeks.org/Scheme: It specifies the protocol used for communication, such as "https://" for secure communication or "https://" for unsecured communication.Prefix: It is an optional subdomain or www indicating the location of the resource within the domain.Domain: Identifies the website's primary address, like "example.com", indicating its unique location on the Internet.Port: Optional and signifies a specific endpoint for communication. Common values are 80 for HTTP and 443 for HTTPS.Path: It specifies the location or directory on the server where the resource is located.Filename: It refers to the specific file or resource within the specified path.Reserved CharactersCertain characters sometimes have special meanings in the URL and it can be used in both ways. For example, the '/' character is a reserved character and it has a special meaning when being used as a delimiter to separate the paths of a URL. Here it is used by encoding it to '%2F'. Else when it has no special purpose it can be used normally. There are many reserved characters which are listed below:CharacterEncoded Form!%21*%2A'%27(%28)%29;%3B:%3A@%40&%26=%3D+%2B$%24,%2C/%2F?%3F#%23[%5B]%5DSome characters need to be encoded while some don't need to be. Here is the classification shows the group of characters that need to be encoded.Safe Characters: Alphanumeric i.e. 0-9, a-z, and A-Z, special characters $, -, _, ., +, !, *, ', (, ), are reserved characters used for their reserved purposes. These characters have no need to be encoded.ASCII Control characters: It includes characters ranging from 00-1F in hex (0-31 decimal) and 7F (127 decimal). These characters needs to be encoded.Non-ASCII Control characters: It includes 80-FF in hex (128-255 decimal). These characters needs to be encoded.Reserved characters: These characters are used for a special purpose and they require encoding.Unsafe characters: This character can be misunderstood within URLs for various reasons. So it requires encoding. The characters < and > are unsafe because they are used as the delimiters around URLs in free text, the quote mark (" ") is unsafe as it is used to delimit URLs in some systems. Unsafe charactersCharacterEncoded Formspace%20"%22<%3C>%3E#%23%%25{%7B}%7D|%7C\%5C^%5E~%7E[%5B]%5DURL Encoded CharactersCHARACTERENCODED FORMbackspace%08tab%09linefeed%0Ac return%0Dspace%20!%21"%22#%23$%24%%25&%26'%27(%28)%29*%2A+%2B,%2C-%2D.%2E/%2F0%301%312%323%334%345%356%367%378%389%39:%3A;%3B<%3C=%3D>%3E?%3F@%40A%41B%42C%43D%44E%45F%46G%47H%48I%49J%4AK%4BL%4CM%4DN%4EO%4FP%50Q%51R%52S%53T%54U%55V%56W%57X%58Y%59Z%5A[%5B\%5C]%5D^%5E_%5F`%60a%61b%62c%63d%64e%65f%66g%67h%68i%69j%6Ak%6Bl%6Cm%6Dn%6Eo%6Fp%70q%71r%72s%73t%74u%75v%76w%77x%78y%79z%7A{%7B|%7C}%7D~%7E %7F`%E2%82%AC%81‚%E2%80%9Aƒ%C6%92„%E2%80%9E…%E2%80%A6†%E2%80%A0‡%E2%80%A1ˆ%CB%86‰%E2%80%B0Š%C5%A0‹%E2%80%B9Œ%C5%92%C5%8DŽ%C5%BD%8F%C2%90‘%E2%80%98’%E2%80%99“%E2%80%9C”%E2%80%9D•%E2%80%A2–%E2%80%93—%E2%80%94˜%CB%9C™%E2%84š%C5%A1›%E2%80œ%C5%93%9Dž%C5%BEŸ%C5%B8 %C2%A0¡%C2%A1¢%C2%A2£%C2%A3¤%C2%A4¥%C2%A5¦%C2%A6§%C2%A7¨%C2%A8©%C2%A9ª%C2%AA«%C2%AB¬%C2%AC%C2%AD®%C2%AE¯%C2%AF°%C2%B0±%C2%B1²%C2%B2³%C2%B3´%C2%B4µ%C2%B5¶%C2%B6·%C2%B7¸%C2%B8¹%C2%B9º%C2%BA»%C2%BB¼%C2%BC½%C2%BD¾%C2%BE¿%C2%BFÀ%C3%80Á%C3%81Â%C3%82Ã%C3%83Ä%C3%84Å%C3%85Æ%C3%86Ç%C3%87È%C3%88É%C3%89Ê%C3%8AË%C3%8BÌ%C3%8CÍ%C3%8DÎ%C3%8EÏ%C3%8FÐ%C3%90Ñ%C3%91Ò%C3%92Ó%C3%93Ô%C3%94Õ%C3%95Ö%C3%96×%C3%97Ø%C3%98Ù%C3%99Ú%C3%9AÛ%C3%9BÜ%C3%9CÝ%C3%9DÞ%C3%9Eß%C3%9Fà%C3%A0á%C3%A1â%C3%A2ã%C3%A3ä%C3%A4å%C3%A5æ%C3%A6ç%C3%A7è%C3%A8é%C3%A9ê%C3%AAë%C3%ABì%C3%ACí%C3%ADî%C3%AEï%C3%AFð%C3%B0ñ%C3%B1ò%C3%B2ó%C3%B3ô%C3%B4õ%C3%B5ö%C3%B6÷%C3%B7ø%C3%B8ù%C3%B9ú%C3%BAû%C3%BBü%C3%BCý%C3%BDþ%C3%BEÿ%C3%BF Comment More infoAdvertise with us Next Article HTML Responsive Web Design P prakhar7 Follow Improve Article Tags : Web Technologies HTML HTML-Basics Similar Reads HTML Tutorial HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. It tells the web browser how to display text, links, images, and other forms of multimedia on a webpage. HTML sets up the basic structure of a website, and then CSS and JavaScript 11 min read BasicsHTML IntroductionHTML stands for Hyper Text Markup Language, which is the core language used to structure content on the web. It organizes text, images, links, and media using tags and elements that browsers can interpret. As of 2025, over 95% of websites rely on HTML alongside CSS and JavaScript, making it a fundam 6 min read HTML EditorsAn HTML Editor is a software application designed to help users create and modify HTML code. It often includes features like syntax highlighting, tag completion, and error detection, which facilitate the coding process. There are two main types of HTML editors: Text-Based Editors - Allow direct codi 5 min read HTML BasicsHTML (HyperText Markup Language) is the standard markup language used to create and structure web pages. It defines the layout of a webpage using elements and tags, allowing for the display of text, images, links, and multimedia content. As the foundation of nearly all websites, HTML is used in over 7 min read HTML Structure & ElementsHTML ElementsAn HTML Element consists of a start tag, content, and an end tag, which together define the element's structure and functionality. Elements are the basic building blocks of a webpage and can represent different types of content, such as text, links, images, or headings.For example, the <p> ele 5 min read HTML AttributesHTML Attributes are special words used within the opening tag of an HTML element. They provide additional information about HTML elements. HTML attributes are used to configure and adjust the element's behavior, appearance, or functionality in a variety of ways. Each attribute has a name and a value 8 min read HTML HeadingsHTML headings are used to define the titles and subtitles of sections on a webpage. They help organize the content and create a structure that is easy to navigate.Proper use of headings enhances readability by organizing content into clear sections.Search engines utilize headings to understand page 4 min read HTML ParagraphsA paragraph in HTML is simply a block of text enclosed within the <p> tag. The <p> tag helps divide content into manageable, readable sections. Itâs the go-to element for wrapping text in a web page that is meant to be displayed as a distinct paragraph.Syntax:<p> Some Content... 5 min read HTML Text FormattingHTML text formatting refers to the use of specific HTML tags to modify the appearance and structure of text on a webpage. It allows you to style text in different ways, such as making it bold, italic, underlined, highlighted, or struck-through. Table of ContentCategories of HTML Text FormattingLogic 4 min read HTML Block and Inline ElementsHTML elements are either block-level, which structure the layout and span full width (like <div> or <p>), or inline, which styles content within blocks without breaking the flow (like <span> or <a>). This distinction covers 80â90% of common HTML usage.Inline and Block Level E 3 min read HTML CharsetsHTML charsets define how characters are represented in a web document. The character encoding ensures that text appears correctly across different devices and platforms.The <meta> tag's charset attribute is used to specify which character encoding the HTML document uses. By setting the charset 4 min read HTML ListHTML ListsAn HTML List allows you to organize data on web pages into an ordered or unordered format to make the information easier to read and visually appealing. HTML Lists are very helpful for creating structured, accessible content in web development.Types of HTML ListsThere are three main types of lists i 5 min read HTML Ordered ListsAn HTML Ordered List is created using the <ol> tag to display items in a specific sequence, typically numbered or alphabetically ordered. Each list item is defined using the <li> (list item) tag. Ordered lists are widely used for instructions, rankings, and step-by-step guidesâappearing 5 min read HTML Unordered ListsAn unordered list in HTML is used to group a set of list items that don't need to be in a specific order. The items in an unordered list are usually displayed with bullet points by default. Here are the some key features of HTML unordered lists:No Order: Lists items without a specific sequence.Custo 4 min read HTML Description ListsAn HTML Description List is not as commonly used as unordered or ordered lists but serves an important purpose for displaying name-value pairs. This type of list is marked up using three tags: <dl>, <dt>, and <dd>.<dl> (Description List): This tag defines the description list 3 min read HTML Visuals & MediaHTML ColorsHTML Colors can be applied to text, backgrounds, borders, links, forms, tables, etc. This article provides an in-depth look at how colors can be applied to various elements such as text, backgrounds, borders, links, forms, and tables in HTML. We will explore different color formats including hexadec 11 min read HTML Links HyperlinksHTML Links, also known as hyperlinks, are defined by the <a> tag in HTML, which stands for "anchor." These links are essential for navigating between web pages and directing users to different sites, documents, or sections within the same page. The basic attributes of the <a> tag include 3 min read HTML ImagesThe HTML <img> tag is used to embed an image in web pages by linking them. It creates a placeholder for the image, defined by attributes like src, width, height, and alt, and does not require a closing tag.There are two ways to insert the images into a webpage:By providing a full path or addre 6 min read HTML FaviconA favicon (short for "favorite icon") is a small yet important image that appears next to your websiteâs title in the browser tab. Also known as a tab icon or bookmark icon, it helps users quickly identify and return to your site. Studies show that over 85% of users rely on visual cues like favicons 4 min read HTML VideoThe <video> element in HTML is used to show video content on web pages. It supports various video formats, including MP4, WebM, and Ogg. It is introduced in HTML5.Scroll down to the End, there is a Tutorial Video which is a live example of the Video Element displaying on this webpage.Syntax: 4 min read HTML Layout & DesignHTML TablesHTML (HyperText Markup Language) is the standard markup language used to create and structure web pages. It defines the layout of a webpage using elements and tags, allowing for the display of text, images, links, and multimedia content. As the foundation of nearly all websites, HTML is used in over 10 min read HTML IframesAn iframe, or Inline Frame, is an HTML element represented by the <iframe> tag. It functions as a 'window' on your webpage through which visitors can view and interact with another webpage from a different source.Iframes are used for various purposes like:Embedding Multimedia: Easily integrate 4 min read HTML LayoutHTML layouts are a technique used to divide a web page into multiple sections, making it easier to apply styles, organize content, and manage operations efficiently. This division improves readability, accessibility, and overall user experience.HTML layout is achieved through elements like <heade 4 min read HTML File PathsHTML file paths specify the location of files or resources that a webpage needs to access, such as images, videos, scripts, or other HTML documents. These paths tell the web browser where to find the files required to display the content correctly or to execute scripts as intended. To insert a file 3 min read HTML Projects& Advanced TopicsHTML FormsHTML forms, defined using the <form> Tags are essential for collecting user input on web pages. They incorporate a variety of interactive controls such as text fields, numeric inputs, email fields, password fields, checkboxes, radio buttons, and submit buttons. Over 85% of websites rely on for 5 min read HTML5 SemanticsHTML5 introduced a range of semantic elements that clearly describe their purpose in human and machine-readable language. Unlike non-semantic elements, which provide no information about their content, semantic elements clearly define their content. For instance, <form>, <table>, and 6 min read HTML URL EncodingA Uniform Resource Locator (URL) is simply the address of a website to access the website content. Web browsers retrieve pages from web servers using a URL (Uniform Resource Locator).What is URL Encoding?URL Encoding is the process of converting the URL into a valid format that is accepted by web br 4 min read HTML Responsive Web DesignHTML Responsive Web Design is a modern approach to web development that ensures web pages look great on any device, from phones and tablets to desktop computers. It focuses on making HTML elements automatically adjustâresizing, hiding, or repositioning based on the screen size. This approach guarant 11 min read Top 10 Projects For Beginners To Practice HTML and CSS SkillsLearning to code is an exciting journey, especially when stepping into the world of programming with HTML and CSSâthe foundation of every website you see today. For most beginners, these two building blocks are the perfect starting point to explore the creative side of web development, designing vis 8 min read HTML Tutorial ReferencesHTML Tags - A to Z ListHTML Tags are fundamental elements used to structure and format content on web pages. They provide instructions to web browsers on how to render text, images, links, and other media.HTML tags are enclosed in angle brackets < > and usually come in pairs: an opening tag and a closing tag. The cl 15+ min read HTML Attributes Complete ReferenceHTML attributes are special words placed inside the opening tag of an HTML element to define its characteristics. Each attribute has two parts:Attribute nameAttribute value (separated by an equal sign = and enclosed in double quotes " ").Syntax:<tag_name attribute_name="value"> Contents... 8 min read HTML Global AttributesHTML attributes provide additional information about an element and define its properties. Global attributes are special types of attributes that can be used with any HTML element, offering common functionality to enhance behavior and presentation.Global attributes can be applied to any HTML element 5 min read HTML5 Complete ReferenceHTML (HyperText Markup Language) is the standard language used to create and design web pages. It defines the structure and layout of a webpage using a series of elements and tags.HTML5 is the latest version of HTML, bringing significant improvements for building modern web applications.It introduce 8 min read HTML5 MathML Complete ReferenceThe MathML comes in HTML5. The current MathML version is 3. It was introduced in the year 2015. MathML stands for Mathematics Markup Language. It is used to represent mathematical equations or expressions in web browsers, like other HTML elements. MathML is used to describe mathematics as a basis fo 3 min read HTML DOM Complete ReferenceHTML DOM (Document Object Model) is a programming interface that represents the elements of an HTML document in a tree-like structure.Allows developers to change content and layout using JavaScript.Enables dynamic updates and user interaction on websites.Facilitates the addition, removal, or modific 15+ min read HTML DOM Audio/Video Complete ReferenceHTML DOM Audio/Video properties and methods allow developers to control audio and video elements programmatically.These controls include playing, pausing, stopping, and adjusting volume.DOM methods enable dynamic interaction and customization of media elements.They enhance the user experience by off 2 min read SVG Element Complete ReferenceSVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas. It is a type of vector graphic that may be scaled up or down. Elements are the core things that is required to work with SVGs.List of SVG Elements:SVG ElementsDescription<a>The <a> 5 min read SVG Attribute Complete ReferenceSVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas. It is a type of vector graphic that may be scaled up or down. Attributes are the things that give the SVG shape, color, etc it will make the SVGs as attractive as you need.List of SVG Attribut 8 min read SVG Property Complete ReferenceSVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas. It is a type of vector graphic that may be scaled up or down. Properties are used for passing the value to the element, there are lots of properties that can be used in SVG elements. table{ di 7 min read HTML Canvas Complete ReferenceThe HTML âcanvasâ element is used to draw graphics via JavaScript. The âcanvasâ element is only a container for graphics. One must use JavaScript to actually draw the graphics. Canvas has several methods for drawing paths, boxes, circles, text, and adding images.Example: This example shows the basic 4 min read Like