URL Encoder / Decoder
Percent-encode or decode URLs and query values, and unwrap double-encoded strings from logs in one click.
Convert cURL commands, including Copy as cURL from DevTools, into JavaScript fetch() or axios code. Free, private, and 100% in your browser.
Tip: in Chrome or Firefox DevTools, right-click a request in the Network tab and choose Copy as cURL (bash or cmd).
API docs and browser DevTools give you requests as cURL commands. This converter reads the command the way curl does, including quoting, the default form Content-Type of -d, and basic auth, and writes the equivalent JavaScript request.
curl https://api.example.com/users \
-H 'Authorization: Bearer TOKEN' \
--json '{"name":"Ada"}'await fetch("https://api.example.com/users", {
method: "POST",
headers: {
"Authorization": "Bearer TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Ada" }),
});Switch between native fetch, which works in browsers and Node.js 18+, and axios, with async/await and optional error handling.
Handles bash quoting, $'…' strings, line continuations, and Chrome's Windows "Copy as cURL (cmd)" format with ^ escapes.
JSON becomes a readable object literal, form data becomes URLSearchParams, -F becomes FormData, and @file uploads are read with fs.
Leaves out headers the browser sets itself (Host, Content-Length, sec-fetch-*, sec-ch-ua) so the code is short and works.
-X, -H, -d, --data-raw, --data-urlencode, --json, -F, -u, -b, -A, -e, -G, -I, -L, -m, --oauth2-bearer, and more. Unsupported options are listed instead of silently dropped.
Commands are converted in your browser. API keys, tokens, and cookies in your cURL command are never uploaded.
Open DevTools (F12), go to the Network tab, right-click a request, and choose Copy > Copy as cURL. Chrome offers bash and cmd variants; both are supported. Paste the command here to get the matching JavaScript.
Yes. fetch is built into Node.js 18 and later. Code that uploads files uses readFile from node:fs/promises; in the browser, use a File from a file input instead.
Browsers do not let JavaScript set headers such as Host, Content-Length, Cookie, Origin, or the sec-fetch-* family, and they add them on their own. Removing them keeps the code clean. Uncheck "Remove browser-managed headers" to keep them for Node.js.
curl sends -d data as application/x-www-form-urlencoded unless you set another Content-Type. The converter keeps that behavior, so a JSON body sent with -d but without a Content-Type header is not silently turned into JSON.
fetch needs no dependency and works everywhere. axios adds conveniences: it throws on 4xx and 5xx responses, serializes JSON automatically, supports request timeouts directly, and has interceptors.
Percent-encode or decode URLs and query values, and unwrap double-encoded strings from logs in one click.
Break a URL into protocol, host, port, path, and fragment, and edit its query parameters as a key-value table.
Identify the browser, operating system, device type, and bots from any User-Agent string, one or thousands at once.
Search every HTTP status code, from 200 OK and 404 Not Found to 418 I'm a teapot, with causes and fixes.