ZeroBloatTools LogoZeroBloatTools
Verified Preset100% Client-Side
Updated 2026-11-15•Instant Calculation

Chrome DevTools cURL Cleaner & Playwright Converter

Pre-loaded with a real Chrome DevTools Copy-as-cURL dump demonstrating automatic removal of brittle browser fingerprint headers (`sec-ch-ua`, `sec-fetch-*`) and JWT Bearer masking.

Interactive Pre-Configured Simulator
cURL Compiler Studio
Client-Side AST
Samples:
GET/api/v2/profile•3 headers
Raw cURL Input
AST Request InspectorParsed Cleanly
GEThttps://app.example.com/api/v2/profile
Query Params
1
Headers
3
Payload
Empty
Stripped 6 browser noise headers: sec-ch-ua, sec-ch-ua-mobile, sec-ch-ua-platform +3 more
Auto-masked 1 secret headers: authorization → env vars
api.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { test, expect } from '@playwright/test';
test('GET /api/v2/profile', async ({ request }) => {
const response = await request.get("https://app.example.com/api/v2/profile", {
params: {
"expand": "billing",
},
headers: {
"accept": "application/json",
"authorization": `Bearer ${process.env.API_BEARER_TOKEN ?? ''}`,
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
},
});
// Verify HTTP status & response payload
expect(response.ok()).toBeTruthy();
expect(response.status()).toBe(200);
const body = await response.json();
expect(body).toBeDefined();
});
Terminal Execution:
npx playwright test api.spec.ts
Request Translation Reference

Chrome DevTools Header Hygiene & Strip List

Removes ephemeral Chromium telemetry headers that break headless CI runs and bloat automated tests.

Header GroupExample HeadersConverter ActionWhy Stripped / MaskedCI Impact
Client Hintssec-ch-ua, sec-ch-ua-platformRemoved AutomaticallyNoise FilterVersion-locked browser strings fail or look suspicious from Node.js
Fetch Metadatasec-fetch-dest, sec-fetch-mode, sec-fetch-siteRemoved AutomaticallyNoise FilterOnly meaningful inside browser sandbox; causes WAF mismatches in API tests
Credentialsauthorization: Bearer eyJ..., cookieMasked to process.envSecret HygieneReplaces sensitive JWTs and session cookies safely
Playwright APIRequestContext Patterns

Header Normalization, Auth & Payload Mapping

  • Raw Chrome DevTools Copy-as-cURL dumps commonly include 15–25 noise headers (`sec-ch-ua*`, `sec-fetch-*`, `priority`, `accept-encoding`) that bloat tests and break across browser updates.
  • Retains essential functional headers (`accept`, `content-type`, custom `x-*` headers) and extracts query strings (`?expand=billing`) cleanly.
  • Supports Chrome DevTools ANSI-C `$` quoting (`$'...'`) natively for complex JSON payloads containing escaped quotes or newlines.
Common cURL Conversion Bugs

Critical Errors to Avoid

Common Error: Leaving browser-specific sec-ch-ua and sec-fetch-* headers in automated API tests.
Best Practice: Browser headers like sec-ch-ua-mobile or sec-fetch-dest indicate browser state and change across browser versions. In headless CI test runs, leaving them in can trigger Cloudflare, Datadog, or AWS WAF anti-bot blocks due to header mismatch. Always strip browser-only headers from backend API tests.
Common Error: Hardcoding production Bearer tokens or API keys into git-committed test files.
Best Practice: Avoid committing raw credentials. Keep secret masking enabled to replace Authorization tokens with environment variables (process.env.API_BEARER_TOKEN), and supply the real secret via your .env file or GitHub Actions secrets.
Common Error: Using page.goto() instead of Playwright APIRequestContext for REST testing.
Best Practice: Testing backend APIs by navigating a full browser page adds massive CPU and memory overhead (rendering HTML, parsing CSS, running client JS). Use Playwright's built-in request fixture (APIRequestContext), which executes direct HTTP requests at Node.js network speeds without launching a browser window.
Frequently Asked Questions

Chrome DevTools Copy-as-cURL to Clean Playwright Test Questions Answered

Why do sec-fetch-* and sec-ch-ua headers hurt automated API tests?

WAFs and anti-bot firewalls check consistency between TLS fingerprints, User-Agent, and Chromium Client Hints. Sending stale browser hints from a Node.js API client frequently triggers false-positive 403 blocks.

Does the cleaner preserve case-insensitive headers like lowercase "authorization"?

Yes. HTTP/2 Chrome DevTools exports lowercase header names such as `authorization: Bearer ...`, which the engine matches case-insensitively for secret masking and noise filtering.

Common cURL Flags Cheat Sheet

-X, --request:
HTTP Method (GET, POST, PUT, DELETE, PATCH, HEAD)
-H, --header:
Request Header ("Header-Name: value")
-d, --data, --data-raw:
HTTP Request Body / Payload (JSON, Form-UrlEncoded, Text)
-u, --user:
Basic Authentication ("username:password")
-b, --cookie:
HTTP Cookie header ("name=value; session=123")
-k, --insecure:
Allow insecure SSL/TLS connections during local testing
Security & Credential Hygiene

Security & Client-Side Privacy Notice

100% Client-Side Processing: This utility parses and generates code entirely in your local browser using an in-memory AST tokenizer. Your cURL commands, secret tokens, endpoints, and data payloads are never sent to any external server.
Environment Secret Hygiene: Always keep "Mask Auth Tokens" checked before pasting curl commands with production credentials. Never commit raw Bearer tokens, cookies, or private API keys to git repositories.