What Is a URL?
A URL (Uniform Resource Locator) is the address used to access a resource on a network. It encodes the protocol, server, path, and optional parameters into a single string — and has strict rules about which characters are allowed and how to encode the rest.
The One-Line Definition
A URL is a string that identifies both the location of a resource and the protocol used to access it. It is defined by RFC 3986 and has the generic form: scheme://authority/path?query#fragment.
Anatomy of a URL
Consider: https://example.com:8080/tools/url-parser?page=2&sort=date#faq
| Component | Example value | Description |
|---|---|---|
| scheme | https | The protocol to use when accessing the resource. Common values: https, http, ftp, mailto, ws. |
| authority | user:pass@example.com:8080 | Optional userinfo (user:pass@), the host (domain or IP), and optional port. Most URLs omit userinfo. |
| path | /tools/url-parser | Hierarchical identifier for the resource within the host. Always begins with / when an authority is present. |
| query | ?page=2&sort=date | Optional. Begins with ?. Contains key=value pairs separated by &, passing data to the server or JavaScript. |
| fragment | #faq | Optional. Begins with #. Identifies a section within the document. Never sent to the server — used only by the browser. |
URL Encoding (Percent-Encoding)
URLs may only contain a limited set of ASCII characters. Characters outside this set — spaces, non-ASCII Unicode, and reserved characters used as delimiters — must be percent-encoded: replaced with a % followed by two hexadecimal digits representing the UTF-8 byte.
| Raw | Percent-encoded |
|---|---|
| hello world | hello%20world |
| name=Ada Lovelace | name=Ada%20Lovelace |
| tags=a&b | tags=a%26b |
| price=£10 | price=%C2%A310 |
| 日本語 | %E6%97%A5%E6%9C%AC%E8%AA%9E |
URL vs URI
urn:isbn:0451450523 is a URI that identifies a book but doesn't tell you where to get it.Parse or Encode a URL Now
Paste any URL into SmartDevBox and it is parsed into its components automatically. URL Parser → · URL Encoder → · URL Decoder →
Frequently Asked Questions
What is URL encoding?
URL encoding (percent-encoding) replaces unsafe characters with % followed by two hex digits representing the UTF-8 byte. A space becomes %20, & becomes %26.
What is the difference between a URL and a URI?
A URI identifies a resource. A URL is a URI that also specifies how to access it (via a scheme like https). All URLs are URIs.
What is a query string?
The portion after ? in a URL. Contains key=value pairs separated by &. Used to pass parameters to the server or client-side JavaScript.
How do I parse a URL online?
Paste your URL into SmartDevBox. It auto-detects URLs and breaks them into scheme, host, port, path, query parameters, and fragment — all client-side.