Skip to main content

URL Encoder & Decoder : Percent-Encoding Converter Online

The Calcivo URL Encoder & Decoder sanitizes web addresses, query strings, and form parameters using standard RFC 3986 percent-encoding. It clearly distinguishes component encoding (for query parameter values) from full URL sanitization to prevent broken links, parameter truncation, and HTTP transmission errors with 100% in-browser security.

Interactive Calculator

100% Client-Side Engine

Step-by-Step Examples

Encoding Query Parameter with Delimiters

Passing search queries containing spaces, ampersands, and equal signs without breaking parameter parsing.

Inputs: Parameter: q=shoes & shirts=sale
Result: q%3Dshoes%20%26%20shirts%3Dsale

Escapes delimiters to prevent HTTP GET parsers from splitting single values into separate parameters.

OAuth 2.0 Redirect URI Parameter

Safely passing a callback URL as a query parameter in an authentication flow.

Inputs: Redirect URI: https://calcivo.site/auth/callback?provider=google
Result: https%3A%2F%2Fcalcivo.site%2Fauth%2Fcallback%3Fprovider%3Dgoogle

All slashes, colons, and question marks are converted into percent codes to preserve integrity.

UTF-8 Non-ASCII Multilingual URL Decoding

Restoring a localized percent-encoded international address into readable characters.

Inputs: Encoded URL: https://calcivo.site/%D8%AD%D8%B3%D8%A7%D8%A8
Result: https://calcivo.site/حساب

Two-byte UTF-8 percent sequences %D8%AD are decoded into their native Arabic/Urdu unicode characters.

How to Use This Tool

  1. Select your desired action: Encode to convert plain text into percent-encoded entities, or Decode to restore human-readable URLs.
  2. Choose your target scope: encodeURIComponent (ideal for parameter values) or encodeURI (for complete URLs with protocols intact).
  3. Paste your web link, API query string, or token text directly into the input field.
  4. Copy the sanitized, valid RFC 3986 output instantly for your codebase, REST API client, or browser navigation.

Pro Tips & Best Practices

  • encodeURIComponent vs encodeURI: Always use encodeURIComponent for individual query parameter values (like search queries or tokens), and encodeURI only when sanitizing an entire full web URL.
  • Percent-20 vs Plus (+): In standard query strings, %20 is the official RFC 3986 standard for space. The plus sign (+) is only valid in application/x-www-form-urlencoded form post bodies.
  • Double-Encoding Pitfall: Never run encode on a string that is already percent-encoded, as %20 will become %2520, causing 404 and API parsing errors.
  • Security & Parameter Injection: Properly encoding user inputs in query strings prevents HTTP Parameter Pollution (HPP) and Cross-Site Scripting (XSS) vectors.

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes every reserved character including "&", "=", "?", and "/". encodeURI preserves URL protocol and path delimiters, only encoding spaces and non-ASCII characters.

Why do spaces become %20 or + in URLs?

%20 is the official RFC 3986 percent-encoded value for space in all URL components. The "+" symbol is historically used specifically in application/x-www-form-urlencoded form post bodies.

Which characters are unreserved and never encoded?

According to RFC 3986, unreserved characters that never require encoding are uppercase letters (A–Z), lowercase letters (a–z), digits (0–9), hyphens (-), underscores (_), periods (.), and tildes (~).

What causes a URIError: malformed URI sequence during decoding?

This error occurs when the decoder encounters a percent sign (%) that is not followed by two valid hexadecimal digits, or encounters an incomplete multi-byte UTF-8 sequence.

Can URL encoding prevent security vulnerabilities?

Yes. Percent-encoding user-supplied values before embedding them into URLs prevents attackers from injecting malicious parameter delimiters or executing HTTP parameter pollution attacks.

Is my text or API key secure when using this tool?

Yes, 100%. All percent-encoding and decoding functions run locally in your browser memory via native JavaScript functions. No inputs or URLs are transmitted over the network.