

Convert any cURL command into Java code using java.net.http.HttpClient — the modern HTTP client built into the JDK since Java 11. No external dependency, no Apache HttpClient or OkHttp install required, and the same builder pattern works for sync and async requests.
Headers, query parameters, JSON or form bodies, basic auth and bearer tokens from your cURL command are written into an HttpRequest built with HttpRequest.newBuilder(). The snippet sends the request synchronously with client.send() and reads the response body as a String.
150 free credits • No credit card required • Setup in <2 minutes
Convert cURL commands into clean, production-ready code for any programming language. Our tool automatically parses headers, methods, data payloads, and authentication from your cURL commands and generates equivalent code with perfect syntax.
Perfect for developers who work with APIs, need to convert browser network panel exports, or want to quickly prototype API integrations. Instead of manually translating cURL commands, get instant, accurate code that follows language best practices and includes proper error handling.
Use the converted code with Scrappey's API for reliable web scraping on JavaScript-heavy and modern websites. All conversions happen instantly with no registration required and complete privacy protection.

Paste your cURL command and get instant code conversion
Complete the verification to convert your cURL command
Enter a cURL command to see the converted code...Register for a free account to access all tools with unlimited usage and advanced features.
Fast, accurate, and perfect for any development workflow
Convert cURL commands to code in seconds. No waiting, no delays - just instant results with perfect syntax.
Support for 15+ programming languages including Python, Node.js, Java, PHP, Go, Ruby, C#, and more.
Your cURL commands are processed securely. No data stored, no tracking, complete privacy protection.
Get production-ready code with proper syntax highlighting, error handling, and language best practices.
Automatically parses headers, methods, data payloads, and authentication from complex cURL commands.
Free to use with no registration required. Convert unlimited cURL commands instantly with no limits.
Quickly convert API documentation examples from cURL to your preferred programming language. Perfect for integration testing and rapid prototyping.
Transform browser network panel cURL exports into automated test scripts. Streamline your testing workflow with instant code generation.
Convert browser network requests to code for automated data collection. Use with Scrappey for advanced request handling.
Quickly prototype API integrations by converting cURL commands from documentation or browser DevTools into working code.
The Java output uses HttpRequest.newBuilder() — URI, method, headers and body publishers map one-to-one from the cURL flags. JSON bodies use HttpRequest.BodyPublishers.ofString with Content-Type application/json, urlencoded bodies build a query string with URLEncoder.encode, and multipart bodies need a manual boundary writer (or the converter recommends Apache HttpClient 5 for heavy multipart use). Responses are read via HttpResponse.BodyHandlers.ofString and parsed with Jackson or Gson at the call site.
Realistic GET + POST with headers and a JSON body, written using java.net.http.HttpClient.
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(30))
.build();
// GET with headers and query params
HttpRequest getReq = HttpRequest.newBuilder()
.uri(URI.create("https://api.example.com/users?page=1&limit=50"))
.header("Authorization", "Bearer YOUR_TOKEN")
.header("User-Agent", "MyApp/1.0")
.GET()
.build();
HttpResponse<String> getResp = client.send(getReq, HttpResponse.BodyHandlers.ofString());
System.out.println(getResp.statusCode() + " " + getResp.body());
// POST with JSON body
String payload = "{\"name\":\"Ada Lovelace\",\"email\":\"[email protected]\"}";
HttpRequest postReq = HttpRequest.newBuilder()
.uri(URI.create("https://api.example.com/users"))
.header("Authorization", "Bearer YOUR_TOKEN")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> postResp = client.send(postReq, HttpResponse.BodyHandlers.ofString());
System.out.println(postResp.statusCode());
}
}Yes. POST, PUT, PATCH and DELETE all work. The converter reads -X, --data, --data-raw, --data-binary, --data-urlencode and -F (multipart) and translates each into the right call shape — JSON bodies become language-native objects, urlencoded bodies become key/value pairs, and multipart bodies use the language's standard form-data approach.
HttpClient supports cookies via a CookieHandler — pass new CookieManager() to HttpClient.newBuilder().cookieHandler(...). It will store Set-Cookie responses and send Cookie headers automatically for subsequent requests to the same host. If your cURL command sets cookies via -b or -H "Cookie: ...", the converter writes them into the Java request headers verbatim. For session-style flows where cookies persist across requests, use a session object (see the example above) so the library tracks Set-Cookie responses automatically.
Yes. The generated Java snippet keeps your request structure intact, so adding a proxy is straightforward — set the standard proxy parameter for the library shown in the output. If you need rotating residential or datacenter proxies to bypass blocking, route the request through Scrappey instead of calling the target directly. With HttpClient, call .proxy(ProxySelector.of(new InetSocketAddress("host", port))) on the builder. For authenticated proxies, also set an Authenticator on the builder.
Java 8 does not have java.net.http.HttpClient. Use Apache HttpClient 5 or OkHttp — the parsed cURL command maps cleanly onto both. Request a Java-8-compatible variant on this page or copy the HttpClient version and translate the builder calls; the request fields are identical.
Need the same cURL command in a different language? Use one of these converters:
Automate workflows visually. Streamline data collection processes.
Pre-built template for modern websites. Simplifies Scrappey integration.
Access via API marketplace. Easy integration with comprehensive docs.
Scalable actor-based automation. Reliable browser rendering.
AI-powered browser automation. Intelligent session management.
Scrape from your terminal. One command, pipeable output, CI-ready.
Portable skill for Claude Code + Codex. Browser-backed data access on demand.
LangChain connector — clean web data for any chain or agent.

LlamaIndex reader — load modern web pages straight into RAG.
Connect with 7,000+ apps. Automate workflows easily.
Visual workflow automation. Connect with 1,000+ apps easily.
Try It For Free. No Subscription Required. No Credit Card Required. Instant Set-Up. 150 Free Requests Are Waiting For You!
Scrappey.com is a web scraping API that handles all the complex aspects of web scraping, such as handling dynamic content, rotating proxies, advanced request handling, headless browsers, and verification processing. It offers an all-in-one solution for extracting publicly available data from websites.
Scrappey.com provides a web scraping API that allows you to send requests to extract publicly available data from websites. It handles dynamic content and modern website complexity, including rotating proxies, advanced request handling, and verification processing. You can easily extract publicly available data from websites using their built-in features like headless browsers and AI-powered data extraction.
Yes, with Scrappey.com, you have the option to use Sticky Rotating Proxies for seamless scraping. Alternatively, you can also set your own proxies if desired.
Yes, Scrappey.com offers a free trial where you can try it out without a subscription or credit card. Instant setup is provided, and you get 150 free scrapes to explore the capabilities of the platform.
We only charge for successful requests. Failed requests are not counted towards your usage, so you only pay for what works.
No problem, you can pass any JavaScript snippet that needs to be executed by using our JavaScript scenario parameter. This allows you to interact with dynamic content, scroll pages, click buttons, wait for elements, and perform any custom JavaScript actions before extracting the data.
Scrappey.com offers simple and transparent pricing: €0.20 per 1,000 direct HTTP requests and €1.00 per 1,000 full-browser requests. Residential proxies are included on both tiers — no separate proxy billing, no hidden fees, no complicated pricing tiers. You only pay for successful requests.
Scrappey.com provides scalable access for extracting publicly available data. Whether you need to extract data from a few pages or a large dataset of publicly accessible content, you can do so with flexible usage options. Please note that Scrappey.com only supports scraping publicly available data, and users must comply with applicable laws and website terms of service.
Scrappey.com provides various support channels for assistance. You can refer to their documentation, frequently asked questions section, blog, and uptime status page. Additionally, you can get in touch with them via email or join their Discord community for further support.
We don't create custom scraping scripts, however we will gladly write some code snippets helping you to use our most powerful features: AI-powered data extraction and JavaScript scenario. Our documentation includes examples in multiple programming languages to get you started quickly.
Each API call to Scrappey counts as one request. Our pricing is based on successful requests. By default, JavaScript rendering is enabled, which allows you to extract data from modern websites with dynamic content. All features including proxies, CAPTCHA solving, and advanced web access handling are included in each request.
Scrappey's API is optimized for fast response time, even when dealing with complex or protected websites. If other scrapers struggle with sites that have advanced security measures, Scrappey is designed to handle these challenges efficiently, ensuring reliable data retrieval. Our advanced web access handling, residential proxies, and intelligent retry logic work together to maximize success rates.