Skip to content

URL encoder & parser. Every link, taken apart.

encoded result

Nothing leaves your browser, every conversion runs on your device.

encodeURIComponent or encodeURI, pick the right one

encodeURIComponent (the default) is for a single value going into a URL slot, a query-parameter value, a path segment, a fragment. It escapes / : ? & = # so a value containing those characters can't break URL parsing. Tick Whole-URL mode to switch to encodeURI, which keeps those structural characters intact, use it on a complete URL that already has correct structure but needs spaces or unicode escaped. Space always encodes as %20 (the RFC 3986 form), never +. Nothing you paste is uploaded; it works offline and is free forever.

§ · written guide

How to use the URL Encoder & Parser

This tool does two jobs with links. Encode / Decode converts text to and from percent encoding using your browser's own encodeURIComponent and encodeURI functions. URL Parser splits a link into its parts and lets you edit its query parameters while it rebuilds the link for you. It is for developers, marketers and anyone fixing a broken link, building a tracking URL or reading a long encoded address.

Step by step

  1. Pick a mode

    Press Encode / Decode to convert text, or URL Parser to take a link apart. Encode / Decode is open when the page loads.

  2. Encode or decode text

    Choose Encode or Decode, then type or paste into the left box. The result appears on the right as you type. Leave Whole-URL mode off for a single value, such as one query value or path segment, and tick it when you are working on a complete address.

  3. Copy or decode again

    Press Copy above the result to copy it. Press Use result as input to move the result into the left box, which is how you unwrap a link that was encoded twice: decode, move it across, decode again.

  4. Parse a link

    In URL Parser, paste a link into the paste a url box, or press Load sample. If you leave out the https:// part, the parser tries again with it added. The Components table lists each part of the link.

  5. Edit the query parameters

    Under Query parameters each parameter is a row with its key and its decoded value. Change any key or value, press + Add parameter for a new row, or press the cross to remove one. The rebuilt url updates as you type.

  6. Copy the new link

    Press Copy URL to copy the rebuilt link with every value encoded again. Press Clear to empty the parser and start over.

Reading the result

  • With Whole-URL mode off, hello world & friends?a=1 encodes to hello%20world%20%26%20friends%3Fa%3D1, so the & ? and = cannot be mistaken for parts of the address. With it on, those characters stay as they are and only the spaces become %20.
  • The Components table shows Protocol, Username, Password, Hostname, Port, Path, Query, Fragment and Origin. A password is shown as dots, an empty part as a dash, and a missing port as 443 (default) or 80 (default).
  • For the sample link the parameters are q with the value hero tools, page with 2 and sort with price. Repeated keys appear as separate rows.
  • In the rebuilt url, spaces in parameter values are written as +, the form style that servers read as a space, so q=hero%20tools comes back as q=hero+tools. Rows with an empty key are left out.
  • A hostname with accented letters is shown in its Punycode form starting with xn--, which is how browsers send it.

Tips and common mistakes

  • Use the default mode for anything that goes inside a link, such as a redirect address passed as a parameter. Whole-URL mode would leave its & and ? unencoded and break the outer link.
  • Decoding stops with an error message if the text has a stray % that is not followed by two hex digits. Find that % and change it to %25.
  • Decode does not turn + into a space. If the text came from a submitted form, replace each + with %20 before decoding.
  • Encoding twice is a common bug: %20 turns into %2520. If you see %25 in a link, decode once and check the result.

Privacy and limits

Everything runs in your browser using its built in URL functions. Nothing you paste is requested, sent or saved, so links with tokens or keys in them stay on your device. The parser does not visit the link.

Back to the tool

§ 02 · what you can do

Everything a URL tool should do.

  • Percent-encode any string with encodeURIComponent, safe for query-parameter values and path segments that contain slashes, ampersands or spaces.
  • Encode a whole URL with the Whole-URL toggle (encodeURI) to escape spaces and unicode while keeping the URL structure parseable.
  • Decode percent-encoded text back to plain text in one click, with “Use result as input” to peel off layered, double-encoded URLs pass by pass.
  • Break any URL into its parts, protocol, username, password, hostname, port, path, query, fragment and origin, in a clean component table.
  • Edit query parameters live as key/value rows: change a value, add a key or remove a row and the rebuilt URL updates instantly.
  • Copy the rebuilt URL, correctly re-encoded and ready to paste into code, a doc or a browser address bar. Nothing is uploaded.
§ 04 · faq

Frequently asked questions.

What's the difference between encodeURIComponent and encodeURI?
encodeURI keeps URL-structural characters (slash, colon, hash, question mark, ampersand) intact, so it's safe on a complete URL, the structure stays parseable. encodeURIComponent escapes all reserved characters including slash and ampersand, so it's safe on a single value that could contain them. Use encodeURI (the Whole-URL toggle here) for full URLs that already have correct structure but need spaces or unicode escaped; use encodeURIComponent for individual parameter values. The wrong choice causes the most common URL bug: an ampersand inside a value being read as a parameter separator.
Why does space sometimes encode as %20 and other times as +?
Both are legal in different contexts. RFC 3986 (the URI standard) says space should be %20, which is universally safe in a URL. The application/x-www-form-urlencoded format used by HTML form submission encodes space as +, but that's only correct in the query-string portion, not the path. This tool always encodes space as %20 because it's the universally correct form. When decoding a form-encoded string, swap each + for %20 first, the decoder treats a literal + as a plus sign.
How does the URL Parser edit query parameters?
Paste a link in URL Parser mode and the browser's URL engine splits it into protocol, username, hostname, port, path, query and fragment. Each query parameter becomes an editable key/value row with its value pre-decoded; repeated keys (?tag=a&tag=b) show as separate rows. Change a value, add a row or remove one and the rebuilt URL updates live, correctly re-encoded and ready to copy. Paste a URL without a scheme and the parser retries with https:// in front before reporting an error.
Which characters get escaped?
Per RFC 3986, the reserved characters are gen-delims (: / ? # [ ] @) and sub-delims (! $ & ' ( ) * + , ; =). Unreserved characters, A-Z, a-z, 0-9, hyphen, underscore, period and tilde, are never escaped. Anything outside the printable ASCII range (unicode) is always escaped. encodeURI leaves the gen-delims and sub-delims unescaped so URL structure survives; encodeURIComponent escapes all reserved characters except the unreserved set.
Does it handle internationalized domain names (IDN)?
The encode and decode modes percent-encode the path and query but don't convert the hostname. The URL Parser uses the browser's URL API, which normalizes a unicode hostname to its Punycode form, so pasting a link on münchen.de shows xn--mnchen-3ya.de in the hostname row. To convert a unicode hostname to Punycode in your own code, use Node's built-in url.domainToASCII or any Punycode library.
Is the URL I paste sent anywhere?
No. The tool uses the browser's native encodeURIComponent / decodeURIComponent and URL APIs, all running client-side on this static page. Nothing you type or paste is transmitted or logged, so it's safe for URLs containing API keys, tokens or session identifiers in the query string. It also works offline once loaded.

Published · Last updated .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply