Skip to main content

    URL Encoder & Decoder

    Encode or decode URLs and query parameters. Supports encodeURI and encodeURIComponent.

    No signup. 100% private. Processed in your browser.

    Common Encodings

    Space%20
    &%26
    =%3D
    ?%3F
    /%2F
    #%23
    +%2B
    @%40

    Why URLs Need Encoding

    URLs can only contain a limited set of characters: letters, numbers, and a few special characters like hyphens and underscores. Everything else — spaces, ampersands, question marks, non-ASCII characters — must be "percent-encoded" to travel safely through browsers, servers, and APIs.

    Percent-encoding replaces each unsafe character with a % followed by two hex digits. A space becomes %20. An ampersand becomes %26. The Japanese character "東" becomes %E6%9D%B1. It's the postal code of the web — ensuring your data arrives at the right destination without corruption.

    This matters more than you think. A URL with an unencoded & in a query parameter can break the entire request. An unencoded space might silently truncate your data. URL encoding prevents these bugs before they happen.

    Characters That Need Encoding

    CharacterEncodedWhy It's Reserved
    Space%20 (or +)Separates URL segments
    &%26Separates query parameters
    =%3DSeparates key from value in params
    ?%3FMarks start of query string
    #%23Marks fragment/anchor
    /%2FSeparates path segments
    @%40Used in email/authentication URLs
    +%2BInterpreted as space in form data

    What this means for you: If you're building URLs dynamically (API calls, redirects, tracking links), always encode parameter values. Most programming languages have built-in functions: encodeURIComponent() in JS, urllib.parse.quote() in Python, URLEncoder.encode() in Java.

    encodeURI vs encodeURIComponent

    encodeURI()

    Encodes a full URL but leaves reserved characters (: / ? # @ & = +) intact. Use it when you have a complete URL with spaces or non-ASCII characters in the path.

    encodeURIComponent()

    Encodes everything except letters, digits, and - _ . ~. Use it for individual query parameter values. This is what you need 90% of the time.

    Common Encoding Mistakes

    Bug

    Double encoding

    Encoding an already-encoded string turns %20 into %2520. This happens when a framework auto-encodes and you've already encoded manually. Decode first, or let only one layer handle encoding.

    Bug

    Encoding the full URL instead of just the value

    Using encodeURIComponent() on an entire URL turns the :// into %3A%2F%2F, breaking the link. Use encodeURI() for full URLs, encodeURIComponent() for individual parameter values only.

    Bug

    Space as + vs %20

    HTML forms encode spaces as +, but URLs use %20. If you're building a URL from form data, replace + with %20. Most modern APIs expect %20, but some legacy systems still expect +.

    Related Tools

    How to use this tool

    1

    Paste a URL or encoded string

    2

    Choose Encode (Component or URI) or Decode

    3

    Copy the result

    Common uses

    • Encoding query parameter values for API calls
    • Decoding percent-encoded URLs for debugging
    • Preparing redirect URLs with special characters
    • Encoding form data for POST requests
    • Making URLs safe for sharing and bookmarking

    Share this tool

    Frequently Asked Questions