CORS Policy Tester — Simulate Preflight Handshakes and Debug Header Errors
Enter a request origin, method, and headers alongside your server CORS policy settings to instantly determine if the request would be allowed or blocked. Evaluates both simple and preflight requests with a step-by-step explanation of each check.
How to Use CORS Policy Tester — Simulate Preflight Handshakes and Debug Header Errors
How to Use the CORS Policy Tester:
Browser Request (left panel):
- Origin: Enter the origin of the page making the request — the full scheme + hostname + port (e.g. https://app.example.com). This becomes the Origin header sent by the browser.
- Method: Select the HTTP method the request will use. Methods other than GET, HEAD, and POST always trigger a preflight.
- Request Headers: Enter any custom headers the request will send, comma-separated (e.g. Content-Type, Authorization). Non-safe headers always trigger a preflight.
- With Credentials: Check this if the request sends cookies or HTTP authentication headers (XMLHttpRequest.withCredentials = true or fetch credentials: "include").
Server CORS Policy (right panel):
- Access-Control-Allow-Origin: Enter the origins your server allows. Use * for any origin, or a comma-separated list of specific origins. Note: * cannot be used with Allow-Credentials: true.
- Access-Control-Allow-Methods: List the HTTP methods your server permits. Include OPTIONS if you want the browser to cache preflight results.
- Access-Control-Allow-Headers: List headers your server accepts from the browser. Use * to allow all headers, or list them explicitly.
- Access-Control-Expose-Headers: Headers the server exposes beyond the safe defaults so JavaScript can read them.
- Max-Age: Seconds to cache a successful preflight response. Browsers will not send another OPTIONS during this time.
- Allow-Credentials: Whether the server accepts credentialed requests (cookies, HTTP auth). Must be true for withCredentials requests to work.
Reading the Result:
- The request type badge shows SIMPLE (no preflight needed) or PREFLIGHT (OPTIONS sent first).
- The decision badge shows ALLOWED or DENIED.
- Evaluation Steps walk through each CORS check in order, showing exactly which check passed or failed.
- Response Headers shows the CORS headers your server would return on a successful preflight or simple request.
Test Scenarios: Use the preset buttons at the top to load common CORS situations instantly.
Frequently Asked Questions
Most Viewed Tools
Screen Size Converter — Diagonal Dimension Tool
Calculate screen width and height from diagonal size and aspect ratio. Convert between inches and centimeters for displays, TVs, and monitors with instant dimension calculations.
Use Tool →TOTP Code Generator — 2FA Testing Tool
Generate time-based one-time passwords from a TOTP secret key. Enter your base32 secret, choose a period and digit length, and get the current and next codes with a live countdown timer. Useful for testing and debugging 2FA integrations.
Use Tool →JSON to Zod — Schema Generator
Generate Zod validation schema code from a JSON sample object. Infers z.string(), z.number(), z.boolean(), z.array(), z.object(), and z.null() types automatically. Handles nested objects, arrays of objects with optional field detection, and outputs copy-ready TypeScript with import and z.infer type alias.
Use Tool →JSONL Formatter — Line-by-Line Validator
Format, validate, and inspect JSON Lines (JSONL) and NDJSON files. Validates each line individually, reports parse errors by line number, outputs compact JSONL or a pretty-print preview, and lets you download the cleaned file.
Use Tool →Password Entropy Calculator — Crack Time Estimator
Calculate the information-theoretic bit entropy of any password or API key. Detects character set pools automatically, shows the total number of possible combinations, and estimates crack time across five attack scenarios from rate-limited web logins to GPU cracking clusters.
Use Tool →TLS Cipher Suite Checker — Strength Analyzer
Check TLS protocol version compatibility and cipher suite strength ratings against current best practices. Supports IANA and OpenSSL cipher names — rates each suite as Strong, Weak, or Deprecated and explains why.
Use Tool →Secret Scanner — API Key & Credential Detector
Scan pasted text, code, or config files for accidentally exposed API keys, tokens, passwords, and private keys. Detects 50+ secret types across AWS, GitHub, Stripe, OpenAI, and more — all client-side, nothing leaves your browser.
Use Tool →TOML Config Validator — Syntax Error Finder
Validate TOML configuration file syntax and report errors with line numbers. Paste any TOML content — Cargo.toml, pyproject.toml, config.toml — and instantly see a green checkmark with key counts and structure stats, or a precise error message pointing to the exact line. Includes a collapsible JSON structure preview to confirm what was parsed.
Use Tool →Related Privacy & Security Tools
API Key Hasher — Secure Storage Tool
Hash API keys using SHA-256, SHA-512, or PBKDF2 before storing them in your database. Generates a Node.js verification snippet and shows the recommended storage format — all 100% client-side using the Web Crypto API.
Use Tool →PGP Key Generator — Browser-Based Key Pair Tool
Generate PGP public and private key pairs for email encryption and code signing. Supports ECC (Curve25519) and RSA up to 4096-bit. Entirely browser-side — keys never leave your device.
Use Tool →TOTP Code Generator — 2FA Testing Tool
Generate time-based one-time passwords from a TOTP secret key. Enter your base32 secret, choose a period and digit length, and get the current and next codes with a live countdown timer. Useful for testing and debugging 2FA integrations.
Use Tool →OAuth 2.0 Scope Builder — Permission String Tool
Build and decode OAuth 2.0 scope strings for Google, GitHub, Stripe, and custom providers. Toggle permissions with risk indicators, generate ready-to-use scope strings, and decode existing scope strings to understand what access they grant.
Use Tool →TLS Cipher Suite Checker — Strength Analyzer
Check TLS protocol version compatibility and cipher suite strength ratings against current best practices. Supports IANA and OpenSSL cipher names — rates each suite as Strong, Weak, or Deprecated and explains why.
Use Tool →IP Allowlist Generator — Firewall Rule Builder
Generate ready-to-paste IP allowlist and blocklist rules for nginx, Apache, iptables, UFW, and AWS Security Groups. Enter IP addresses or CIDR ranges, select your target platform, and get production-ready firewall config instantly.
Use Tool →Password Entropy Calculator — Crack Time Estimator
Calculate the information-theoretic bit entropy of any password or API key. Detects character set pools automatically, shows the total number of possible combinations, and estimates crack time across five attack scenarios from rate-limited web logins to GPU cracking clusters.
Use Tool →Content Security Policy Generator — XSS Shield Builder
Build Content Security Policy headers interactively. Toggle directives like script-src, style-src, and img-src, select allowed source tokens, and add custom origins. Instantly outputs your CSP as an HTTP header, meta tag, Nginx directive, or Apache header.
Use Tool →Share Your Feedback
Help us improve this tool by sharing your experience