Skip to content
Formats

Proxy URLs and percent-encoding: preserving special characters

A complete proxy URL is convenient for imports, but its components have strict boundaries. A colon, @ sign, square bracket, or percent sign may be a delimiter or data. Concatenating fields without encoding can make the client parse a different value from the one the user intended.

2 min readReviewed and updated: August 6, 2026

Key points in one minute

  • The scheme identifies how to communicate with the proxy.
  • Authority can contain userinfo, host, and port.
  • Reserved characters used as data need percent-encoding.
  • The same component must not be encoded or decoded twice.

URI components

A URI starts with a scheme, followed by an authority that commonly contains address and port. Userinfo, when supported by the client, appears before @. A parser separates components before safely decoding data inside them.

Reserved and unreserved characters

Letters, digits, and a small unreserved set can be carried directly. Delimiters such as @, colon, and percent have special meanings. When they are part of a username or password, an exporter converts the corresponding bytes to percent-encoded form.

The double-encoding failure

After encoding, the percent sign belongs to an escape sequence. Processing it again changes it to %25 and alters the credential. Store the original value and produce encoded output only at the export boundary.

Client compatibility

Chromium and curl accept defined proxy URI forms, but embedded-credential support differs. Chrome understands the scheme, host, and port while ignoring usernames and passwords embedded in manual proxy settings. Show a preview for the selected application and offer output without userinfo when credentials are entered separately.

Practical checklist

  1. 1Use an explicit http or socks5 scheme.
  2. 2Encode data only within its own component.
  3. 3Do not percent-encode the same value twice.
  4. 4Validate IPv6 brackets and port placement.
  5. 5Compare the output with the client's documentation.

Sources and documentation

This material is based on primary, official, and technical sources. The article is an original summary written for this knowledge base.

  1. 1.RFC Editor / IETF: Uniform Resource Identifier: Generic Syntax
  2. 2.curl project: curl URL syntax
  3. 3.Chromium Project: Proxy support in Chrome

Continue with the service

Review connection details and current plans, or test an existing proxy without sending its credentials to the server.

Continue reading

More articles on related topics

Team decision matrix

HTTP or SOCKS5 for QA and monitoring: a practical decision matrix

Read

Connection formats

How to write an IPv6 proxy address in a URL

Read

Protocols

HTTP proxies: what happens to a web request

Read

HTTP and TLS

HTTP CONNECT proxy tunnel: how HTTPS works through a proxy

Read