Monu Tools

cURL to fetch 변환기

브라우저에서 curl 명령을 동등한 JavaScript fetch 코드로 변환합니다.

cURL to fetch 사용 방법

  1. 01

    curl 명령을 붙여넣으세요.

  2. 02

    동등한 fetch 코드가 즉시 생성됩니다.

  3. 03

    JavaScript를 프로젝트에 복사하세요.

Turn curl into fetch

A converter that turns a curl command into equivalent JavaScript fetch code, parsing the method, URL, headers and body so you get a ready-to-use request instead of translating it by hand.

It is a common need: API docs and tools like browser devtools give you a curl command, but your app is written in JavaScript. This bridges the two so you can paste curl and get fetch.

It runs locally in your browser, so your command, including any tokens or credentials in the headers, never leaves your device.

Flags it understands

It understands the common flags: -X for the method, -H for headers, -d and its variants for the body, -u for basic auth, plus -A for the user agent and -b for cookies. A data flag implies POST, matching how curl behaves.

Multi-line commands

Multi-line commands work as-is. Backslash line continuations are joined automatically, so you can paste a command exactly as it appears in documentation without cleaning it up first.

Ready-to-run output

The output is a fetch call with the method, headers and body filled in, which you can drop into your code and await like any other fetch.

자주 묻는 질문

어떤 curl 플래그를 지원하나요?

일반적인 것들입니다. -X(메서드), -H(헤더), -d 및 변형(본문), -u(기본 인증), -A와 -b를 지원합니다. 데이터 플래그는 POST를 의미합니다.

명령이 서버로 전송되나요?

아니요. 변환은 브라우저에서 완전히 실행되므로 명령과 그 안의 토큰이 기기 밖으로 나가지 않습니다.

여러 줄 명령을 처리하나요?

네. 백슬래시 줄 이어 쓰기가 자동으로 합쳐지므로 문서에 표시된 그대로 명령을 붙여넣을 수 있습니다.

출처

이 도구 임베드하기

이 도구를 직접 운영하는 웹사이트에 추가하세요. 아래 코드를 복사하면 자동으로 최신 상태로 유지됩니다.

<iframe src="https://monu.tools/embed/ko/curl-to-fetch" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

관련 도구