Skip to content

cURL Converter

Runs in your browser

Paste a cURL command and read it back as code. Sixteen targets, including Spring's WebClient and RestClient, and every token in it masked before it reaches your clipboard.

Try one:

Your cURL command is processed locally in your browser and is not sent to our servers.

Detected request

Paste a command to see the method, headers and body it carries

Generated code

The generated code shows up here

How this one works

The command is split the way a shell would split it: single quotes literal, double quotes with escapes, and a backslash before a newline joining the lines. That is why a multi-line paste out of a terminal or Postman’s “Copy as cURL” works without editing. The flags are then read into one request: method, URL, query parameters, headers, cookies, credentials and body.

All sixteen targets read that one request, so they cannot disagree about what your command said. Each writes the code its ecosystem would actually write: Spring gets WebClient and RestClient chains with a real MediaType, Python gets json= and params= rather than a hand-built string, Go gets its import block and error handling, and a JSON body comes back as an editable object rather than a wall of escaped quotes.

An option that can’t be expressed in the target (a proxy, a client certificate, a timeout) is listed above the code rather than dropped in silence.

Questions

Is my cURL command uploaded anywhere?

No. The parser and all sixteen generators are JavaScript running in this page, so the command never leaves the tab. There is no server to receive it. Watch your browser’s network panel while you type, or disconnect and keep converting.

Why are my tokens replaced with YOUR_TOKEN?

Because the commands people convert usually come from a browser’s network tab, which means they carry a live session token, and the generated code usually ends up in a ticket, a pull request or a chat. Masking is on by default for that reason. “Show real values” under the code turns it off, and the scheme is kept either way so you can still see it was a Bearer token.

Which cURL options are supported?

The ones that change the request: -X, -H, -d and its variants, --data-urlencode, --json, -F for multipart, -G, -u, -b, -A, -e, --url, -L, -k, -I and -T. Options that only change how curl behaves, such as -s or --compressed, are ignored. Anything else is named in a warning above the code, and the rest of the command is still converted.

Why does the Spring code look different from the Java code?

Because it should. Wrapping java.net.http in a Spring class name produces something no Spring codebase would contain. WebClient and RestClient get their own fluent chains, contentType(MediaType.APPLICATION_JSON) instead of a raw header, and setBasicAuth for -u credentials.

Does it handle a command copied straight out of my terminal?

Yes. Multi-line commands with trailing backslashes, a leading $ prompt, values glued to their flag such as -XPOST, and --header=value all parse. If a quote is left unclosed, the error says which character it opened at rather than just calling the command invalid.

Does the generated code follow redirects like curl?

Only if your command said so. curl does not follow redirects unless you pass -L, while most HTTP clients do by default, so the generated code is left on its own library’s default unless -L was in the command.

Keyboard shortcuts

Global

  • Show this shortcuts dialogShift?
  • Toggle light / dark themeCtrlShiftL
  • Close dialogsEsc

Formatter & Validator

  • Format JSONCtrlEnter
  • Minify JSONCtrlShiftM
  • Copy outputCtrlShiftC
  • Download output as .jsonCtrlShiftS
  • Clear input and outputCtrlShiftX

Tree Viewer

  • Focus the search box/
  • Expand all nodesCtrlShiftE
  • Collapse all nodesCtrlShiftR

Diff

  • Swap document A and BCtrlShiftS

Time & date tools

  • Use the current time (Epoch Converter)CtrlEnter
  • Copy the main resultCtrlShiftC
  • Clear the inputCtrlShiftX

JSON tools

JSON FormatterPretty-print or minify
JSON ValidatorCheck strict JSON validity
JSON Tree ViewerBrowse JSON as a tree
JSON DiffCompare two documents
JSON Path FinderExplore JSONPath expressions
JSON → CSVFlatten JSON into rows
CSV → JSONTurn rows back into objects

JWT tools

JWT DecoderRead header, payload, claims
JWT VerifierCheck an HMAC signature
JWT Expiry Checkeriat, nbf and exp in local time
JWT GeneratorBuild a signed test token
Base64URL EncoderEncode or decode a segment

Time & date tools

Epoch ConverterTimestamps to real dates
Cron Expression ExplainerCron in plain English
Time Zone ConverterOne moment, many cities
Duration CalculatorDate maths and durations

Code formatters

SQL FormatterBeautify or minify SQL
HTML FormatterBeautify or minify HTML
CSS FormatterBeautify or minify CSS
JavaScript FormatterBeautify or minify JS
Markdown to HTMLConvert with a live preview

API tools

cURL ConvertercURL to code, ten ways
API Response TypesType an API response

Pages

JSON toolsFormat, validate, compare and convert JSON.
JWT toolsDecode, verify and generate JSON Web Tokens.
Time & date toolsConvert timestamps, read cron, compare zones.
Code formattersBeautify and minify SQL, HTML, CSS and JavaScript.
API toolsConvert cURL commands and type their responses.
HomePopular tools and categories
All categoriesBrowse tools by category
AboutWhat ToolJar is and why
PrivacyWhat is and is not collected

Theme

Switch to light theme
Switch to dark theme