DevTools Logo

URL Encoder/Decoder

URL Encoder & Decoder

Encode and decode URLs with multiple modes and comprehensive analysis

Input & Settings

Common Use Cases

Basic URL Encoding

Encode spaces and special characters in URLs.

Original: https://site.com/search?q=hello world
Encoded: https://site.com/search?q=hello%20world

Path Parameters

Safely encode path segments with special characters.

Original: /users/john doe/profile
Encoded: /users/john%20doe/profile

Details

This tool helps you convert special characters into URL-safe format and vice versa. It's particularly useful when working with URLs containing special characters, spaces, or non-ASCII characters like Turkish letters (ğ, ş, ı, etc.). URL encoding replaces unsafe ASCII characters with a '%' followed by two hexadecimal digits.

More Examples

Encoding Special Characters in URLs

Original: https://example.com/search?q=mavi kalem&category=kırtasiye
Encoded: https://example.com/search?q=mavi%20kalem&category=k%C4%B1rtasiye

Spaces are converted to %20, and Turkish characters like 'ı' are encoded to their UTF-8 representation.

Encoding Turkish Domain Names

Original: https://örnek.com/ürünler
Encoded: https://%C3%B6rnek.com/%C3%BCr%C3%BCnler

Turkish characters in domain names and paths are encoded: 'ö' becomes %C3%B6, 'ü' becomes %C3%BC

Encoding Email Addresses

Original: örnek@şirket.com
Encoded: %C3%B6rnek@%C5%9Firket.com

Email addresses with special characters can be encoded for use in URLs or HTML attributes.

Encoding Query Parameters

Original: product=Beyaz Eşya&price=1000₺&filter=çamaşır makinesi
Encoded: product=Beyaz%20E%C5%9Fya&price=1000%E2%82%BA&filter=%C3%A7ama%C5%9F%C4%B1r%20makinesi

Query parameters often need encoding to handle spaces, currency symbols, and special characters correctly.

    Examples

    Component-encode a query value

    Input
    name=Ada Lovelace&role=admin!
    Output
    name%3DAda%20Lovelace%26role%3Dadmin!

    `encodeURIComponent` percent-encodes reserved characters like `=` and `&`, and spaces become `%20`, so the value is safe to drop into a query string. A few characters — `!`, `'`, `(`, `)`, `*` — are left as-is by the spec.

    Full-URL encode — preserves the URL's structure

    Input
    https://example.com/path with spaces?q=ç
    Output
    https://example.com/path%20with%20spaces?q=%C3%A7

    `encodeURI` leaves reserved delimiters (`:`, `/`, `?`, `=`, `&`) intact so the URL still parses, while encoding spaces and non-ASCII bytes.

    Decode percent-encoded text — including non-ASCII

    Input
    %E4%B8%AD%E6%96%87%20%2B%20signs
    Output
    中文 + signs

    Each `%XX` triple is one byte of UTF-8; reassembled, the percent-encoded bytes decode back to the original characters.

    About this tool

    Percent-encoding replaces characters a URL cannot carry safely with a % plus two hex digits: a space becomes %20, & becomes %26. RFC 3986 defines the reserved set. Paste text and press Encode or Decode — the page checks for %XX sequences and picks the direction automatically.

    Five modes cover different jobs: URI Component escapes everything (encodeURIComponent), Full URI keeps / and : intact (encodeURI), Query String encodes each name and value between & and =, URL Path treats each slash-separated segment, and Custom encodes only the characters you list. Size and character stats show what changed.

    How to use this tool

    1. Paste the input

      Drop in a URL, a query string, form data, or an already-encoded fragment.

    2. Pick a mode

      Leave auto-detection on, or choose one of the five encoding modes yourself.

    3. Run the conversion

      Press Encode or Decode and read the result with its size and character stats.

    4. Copy the output

      Move the converted string straight into your code, config, or address bar.

    Use cases

    Building safe query strings

    Concatenate `?` + `encodeURIComponent(key) + "=" + encodeURIComponent(value)` and you'll never have an unescaped `&` or `=` quietly add a second parameter.

    Passing non-ASCII text in URLs

    Email subjects, slugs with diacritics, or any UTF-8 string can ride in a URL if you percent-encode the bytes first.

    Decoding captured URLs

    When a tap or redirect gives you a `%`-heavy URL, decode the parameters to read what was actually sent — useful for debugging redirect chains and webhook URLs.

    Sending form payloads in `application/x-www-form-urlencoded`

    Both keys and values go through `encodeURIComponent` before joining with `=` and `&`, exactly as a browser serializes an HTML form submission.

    Encoding modes

    ModeWhat it escapes
    URI ComponentAll reserved characters; suits one name or value
    Full URIKeeps ; / ? : @ & = # so a full URL still parses
    Query StringEncodes each name and value separately, preserving & and =
    URL PathEncodes each slash-separated segment, leaving the slashes
    CustomOnly the characters you type into the custom list

    Unicode input is converted to UTF-8 first, so é becomes %C3%A9.

    Common mistakes

    Mistake:Double encoding

    Fix:A space was encoded twice: the % of %20 became %25. Decode once and inspect before re-encoding.

    Mistake:Assuming + means space

    Fix:This tool outputs %20 and leaves a literal + untouched; only HTML form encoding reads + as a space.

    Frequently asked questions

    What is the difference between encodeURI and encodeURIComponent?

    encodeURIComponent escapes every reserved character, so it suits a single name or value. encodeURI leaves the reserved URL punctuation intact so a complete URL still parses. The tool exposes them as the URI Component and Full URI modes.

    Why do I see %2520 in my URL?

    A space encoded twice: %20 ran through an encoder again, turning its percent sign into %25. Decode once, confirm the text, and skip the extra pass next time.

    Should spaces be + or %20?

    In application/x-www-form-urlencoded bodies a + stands for a space, while ordinary URLs use %20. This tool produces %20, which every server accepts, and its decoder does not turn + back into a space.

    Which characters never need encoding?

    Letters, digits, hyphen, underscore, period and tilde. Anything carrying URL structure — ? & # / : and friends — must be escaped when it appears inside a value rather than as syntax.

    References & standards