URL Encode Decode

Percent-encode text for links, decode %XX sequences, or break a full URL into its decoded query parameters. Runs in your browser.

URL encoder and decoder
Mode

    Text is encoded as UTF-8, so accented letters and emoji become multi-byte %XX sequences. Everything runs in your browser; nothing you paste is sent anywhere.

    On this page

    The URL encoder and decoder converts text to percent-encoding for use in web addresses and back again, and can break a full URL into its parts with every query parameter decoded. “café au lait & cream?” encodes to caf%C3%A9%20au%20lait%20%26%20cream%3F as a query value, and decoding that string gives the original text back. Choose component, full URL or form encoding to match where the text will be used. Everything runs in your browser, so nothing you paste is sent anywhere.

    Developers, marketers and SEO specialists use URL encoding constantly: building links with tracking parameters, debugging API requests, reading redirect URLs, checking analytics reports and fixing broken links that contain spaces or non-English characters.

    How to use the URL encoder and decoder

    1. Choose a mode: Encode, Decode or Parse URL.
    2. For encoding, pick the type. Use Component for a single value such as a search term or a path segment, Full URL for a whole address you want to make safe without breaking its structure, and Form data for values sent by HTML forms, where spaces become +.
    3. Paste your text or URL into the box.
    4. For decoding, keep “Treat + as a space” ticked for query strings and form data. Untick it if a + in your text is a real plus sign.
    5. Select the button to see the result. You can copy it, or use it as the next input to reverse the conversion.

    What is URL encoding?

    A URL may only contain a limited set of characters: letters, digits and a few symbols. Some symbols, such as / ? # & and =, have special meanings that separate the parts of an address. URL encoding, also called percent-encoding, represents any other character, or a special character used as ordinary data, as a % sign followed by two hexadecimal digits giving the value of each byte. A space becomes %20, & becomes %26 and ? becomes %3F. The rules are defined in RFC 3986, the standard for URI syntax.

    Characters outside basic English are first converted to bytes using UTF-8, and each byte is then percent-encoded. The letter é is two bytes in UTF-8, so it becomes %C3%A9. Most emoji take four bytes, so 😀 becomes %F0%9F%98%80.

    Which characters are encoded?

    • Never encoded (unreserved): A–Z, a–z, 0–9 and the four symbols – _ . ~
    • Reserved characters: : / ? # [ ] @ ! $ & ‘ ( ) * + , ; = have structural meanings. They are left as they are when they play that role in a URL, and encoded when they appear inside a value.
    • Everything else: spaces, quotes, < >, %, non-English letters and emoji are always encoded.

    Component, full URL and form encoding

    The three encoding types differ in which characters they leave alone:

    • Component encoding encodes everything except the unreserved characters. Use it for a single query value, a path segment or anything that will be inserted into a URL, because it makes sure characters like & and = in the data can’t be mistaken for separators. This tool also encodes ! ‘ ( ) and *, which JavaScript’s encodeURIComponent leaves alone, to follow RFC 3986 strictly.
    • Full URL encoding keeps the characters that give a URL its structure, such as : / ? # & and =, and encodes only characters that aren’t allowed at all, such as spaces and non-English letters. Use it to tidy a complete address that someone typed with spaces or accents. Don’t use it for individual values, because an & inside a value would not be encoded.
    • Form encoding (application/x-www-form-urlencoded) is the format browsers use when submitting HTML forms. It is like component encoding, but spaces become + instead of %20.

    Worked example

    Suppose you want to link to a search for fish & chips. If you simply write ?q=fish & chips, the space breaks the URL and the & starts a new parameter, so the search only sees “fish “. Component encoding gives ?q=fish%20%26%20chips, and form encoding gives ?q=fish+%26+chips. Both are read correctly as the full phrase.

    Decoding URLs

    Decoding reverses the process, turning every %XX sequence back into its byte and the bytes back into text. The tool accepts both upper-case and lower-case hexadecimal, so %C3%A9 and %c3%a9 both decode to é.

    The only judgement call is the + sign. In query strings and form data, + means a space. In the path of a URL, a + is a real plus sign, as in /c++/. When the “Treat + as a space” box is ticked, + becomes a space before decoding; untick it if your text contains genuine plus signs. A real plus sign in a query value should always be encoded as %2B to avoid this ambiguity.

    Parsing a URL

    Parse mode splits a full address into its parts and decodes each one:

    • Protocol: usually https.
    • Host: the domain name, such as example.com.
    • Port: shown only when one is given, such as 8080.
    • Path: the part after the domain, such as /search page.
    • Query parameters: each name and value from the part after ?, decoded and listed in a table, including parameters with empty values.
    • Fragment: the part after #, which points to a section of the page and is never sent to the server.

    It’s a quick way to read long tracking links, check which UTM parameters a campaign link carries, or see where a redirect URL actually leads. Paste https://example.com/search?q=caf%C3%A9+au+lait&page=2 and the table shows q = café au lait and page = 2.

    Double encoding

    A common bug happens when text that is already encoded gets encoded again. The % sign itself is encoded as %25, so café becomes caf%C3%A9 after one round and caf%25C3%25A9 after two. Links with %25 followed by two hex digits are a strong sign of double encoding. When the decoded result still contains % sequences, the tool points this out; decode it a second time to get the original text. To avoid the problem, encode each value exactly once, at the moment you insert it into the URL.

    Decoding errors explained

    • A % not followed by two hex digits: text such as “100%” isn’t valid encoding. A literal % must be written as %25.
    • Invalid UTF-8: sequences such as %E9 on its own come from older encodings like Latin-1, where é was a single byte. Modern URLs use UTF-8, where é is %C3%A9. The tool reports these rather than showing garbled characters.
    • Spaces in a URL to parse: a real URL can’t contain spaces. Encode them as %20 first.

    URL encoding and SEO

    Search engines handle encoded URLs well, and non-English characters in addresses are displayed in readable form in search results and browser address bars even though they travel as percent-encoding. Still, short, readable URLs made of lower-case words and hyphens are easier to share and less likely to break. Spaces in file names are a frequent cause of broken links, so use hyphens instead. When you add tracking parameters to links, make sure each value is component-encoded so characters like & in a campaign name don’t cut it short.

    URL encoding in code

    In JavaScript, encodeURIComponent() encodes a single value and encodeURI() a whole address; URLSearchParams builds query strings with form encoding automatically. In Python, urllib.parse.quote() and quote_plus() encode, and unquote() decodes. PHP has rawurlencode() for RFC 3986 encoding and urlencode() for form encoding. Results differ slightly between languages in how they treat spaces and characters like ! and *, which is why two tools can produce different but equally valid output.

    URL encoding is not encryption

    Percent-encoding only makes text safe to put in a URL; anyone can decode it instantly. Never put passwords, personal information or secret keys in a URL, encoded or not, because URLs are stored in browser history, server logs and analytics tools, and can be passed to other sites in the referrer header.

    Related calculations

    For related questions, use the Base64 encode decode tool to encode text to Base64 or decode it back, or the password generator to create strong random passwords.

    Frequently asked questions

    A way of writing characters that aren't allowed in a web address, or that have a special meaning there, as a % sign followed by two hexadecimal digits. A space becomes %20.

    %20 is an encoded space. Spaces aren't allowed in URLs, so they're written as %20, or as + in query strings and form data.

    Both can represent a space. %20 works anywhere in a URL. + means a space only in query strings and form data; in the path it is a real plus sign.

    Choose Decode, paste the encoded text and select Decode. Every %XX sequence is turned back into the original characters, including accented letters and emoji.

    Use encodeURIComponent, the Component option here, for individual values such as a search term. Use encodeURI, the Full URL option, only to tidy a complete address, because it doesn't encode &, = or ?.

    %25 is an encoded % sign. Seeing %25 followed by two hex digits, such as %2520, usually means the text was encoded twice.

    They are converted to UTF-8 bytes and each byte is percent-encoded. é becomes %C3%A9 and 😀 becomes %F0%9F%98%80.

    Encode it as %2B. An unencoded + in a query string is read as a space.

    The text was probably encoded with an older character set such as Latin-1, where é is %E9. Modern URLs use UTF-8, where é is %C3%A9.

    Yes. Choose Parse URL and paste the link. The tool lists the host, path, fragment and every query parameter with its decoded value.

    No. Encoding, decoding and parsing all happen in your browser.