Home › Free tools › Proxy code generator
Proxy code generator
Get working code for connecting through a ProxyHQ proxy in cURL, Python, Node.js or PHP. Enter your login, password and port, choose a country if you need one, pick a language and copy the code. Everything runs in your browser: your login and password are never sent anywhere.
How to generate proxy code
- Choose the protocol and check the port. The default is 823 for HTTP and 824 for SOCKS5.
- Enter your login and password from the dashboard. Leave them empty to get placeholders you can replace later.
- Optionally pick a country. The country is added to your login for you.
- Pick a language and copy the code, then run it. The example requests an IP address page so you can see the proxy's exit IP.
ProxyHQ proxies
Need proxies for your project? Pick the type that fits. Pay as you go with crypto. Traffic never expires.
Residential proxies
Real home IPs in 190+ countries. Rotating and sticky sessions.
Datacenter proxies
Fast server IPs for high-volume work and large lists.
Mobile proxies
Real carrier IPs for strict sites and mobile-only content.
Frequently asked questions
How do I choose a country in the proxy login?
Add the country code to your login after two underscores and "cr.", for example login__cr.de for Germany. This tool adds it for you when you pick a country.
Should I use HTTP or SOCKS5?
Both work on the same gateway. Use HTTP / HTTPS for most scripts and browsers, and SOCKS5 if your software only supports SOCKS.
Is my password sent anywhere?
No. The code is generated in your browser and nothing is sent to our servers.
Does the generated code work with sticky sessions?
Yes. Enter a sticky port between 10000 and 20000 to keep the same IP for a while. Your dashboard shows the exact ports.
More free tools
What is my IP
See your public IP address with country and flag, city, ISP or carrier, ASN and network range.
Proxy checker
Test a ProxyHQ proxy and see the exit IP, its location and ISP, and the response time.
Proxy format converter
Convert proxy lists between host:port:user:pass, user:pass@host:port and URL formats.
Proxy traffic calculator
Estimate how many GB you need from pages and page size, with prices for all three proxy types.