URL Parser online

This tool allows you to parse a URL into its individual components i.e. scheme, protocol, hostname, path, domain, subdomain, querystring... and display results as table or json

Enter your url then parser

As the use of the internet continues to grow, so too does the number of complex URLs that are being used. URL parsing is a process that is used to extract the parameters from a given URL and make them easier to manage. Fortunately, there is now an online URL Parser tool to help make this process easier.

The URL Parser tool is an extremely helpful tool that can be used to quickly and easily extract the parameters from any given URL. It is a free, open source tool that can be used by anyone to extract the parameters from a URL.

To use the URL Parser tool, all you need to do is enter the URL that you want to parse and the tool will generate a list of all the parameters contained within the URL. This list can then be used to easily manage and access the parameters in the URL.

For example, if you had a URL such as http://www.example.com/search?q=query&page=2, using the URL Parser tool you would be able to quickly and easily generate a list of the parameters contained within the URL. These parameters would include “q”, which contains the search query, and “page”, which contains the page number of the search results.

The URL Parser tool is a great way to quickly and easily extract the parameters from a URL. It can save you time and effort when managing complex URLs and help you easily access the parameters within a URL.

Example code in php

// Parse the URL
$url = parse_url('https://www.example.com/path/to/page?param1=value1&param2=value2#fragment');

// Get the host name
$host = $url['host'];

// Get the path
$path = $url['path'];

// Get the query string
$query = $url['query'];

// Get the fragment
$fragment = $url['fragment'];

Example code in Nodejs

// Parse the URL
const url = new URL('https://www.example.com/path/to/page?param1=value1&param2=value2#fragment');

// Get the host name
const host = url.hostname;

// Get the path
const path = url.pathname;

// Get the query string
const query = url.search;

// Get the fragment
const fragment = url.hash;

Example code in JAVA

// Parse the URL
URL url = new URL("https://www.example.com/path/to/page?param1=value1&param2=value2#fragment");

// Get the host name
String host = url.getHost();

// Get the path
String path = url.getPath();

// Get the query string
String query = url.getQuery();

// Get the fragment
String fragment = url.getRef();

Example code in GO lang

// Parse the URL
u, _ := url.Parse("https://www.example.com/path/to/page?param1=value1&param2=value2#fragment")

// Get the host name
host := u.Host

// Get the path
path := u.Path

// Get the query string
query := u.RawQuery

// Get the fragment
fragment := u.Fragment

Example code in Swift

// Parse the URL
guard let url = URL(string: "https://www.example.com/path/to/page?param1=value1&param2=value2#fragment") else { return }

// Get the host name
let host = url.host

// Get the path
let path = url.path

// Get the query string
let query = url.query

// Get the fragment
let fragment = url.fragment

Example code in C++

// Parse the URL
QUrl url("https://www.example.com/path/to/page?param1=value1&param2=value2#fragment");

// Get the host name
QString host = url.host();

// Get the path
QString path = url.path();

// Get the query string
QString query = url.query();

// Get the fragment
QString fragment = url.fragment();

Example code in Flutter

// Parse the URL
var url = Uri.parse("https://www.example.com/path/to/page?param1=value1&param2=value2#fragment");

// Get the host name
var host = url.host;

// Get the path
var path = url.path;

// Get the query string
var query = url.query;

// Get the fragment
var fragment = url.fragment;