CORS Header Generator
Access-Control headers for nginx, Apache and Express – with checks.
Runs entirely in your browser. Nothing is sent anywhere.
How it works
- 1Paste or type your text.
- 2Choose the options you need.
- 3Copy or download the result.
About this tool
CORS Header Generator: Access-Control headers for nginx, Apache and Express – with checks. Paste your text and the result appears immediately, ready to copy or download. Everything happens locally in your browser — nothing you paste is uploaded or stored.
Example
Input
https://app.example.com https://admin.example.com
Output
# HTTP response headers
Access-Control-Allow-Origin: <request Origin, if allowed>
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Max-Age: 600
Vary: Origin
# nginx
map $http_origin $cors_origin {
default "";
"https://app.example.com" $http_origin;
"https://admin.example.com" $http_origin;
}
location /api/ {
add_header Access-Control-Allow-Origin "$cors_origin" always;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
add_header Access-Control-Allow-He…
How do I use the CORS Header Generator?
Paste or type your text. Choose the options you need. Copy or download the result.
Is the CORS Header Generator free?
Yes. It is completely free with no sign-up, no usage limits and no watermark.
Is my data sent to a server?
No. Everything is calculated locally in your browser. Nothing you enter is uploaded, logged or stored.
Does it work on my phone?
Yes. It works in any modern browser on Android, iPhone, iPad, Windows, Mac and Linux — no app needed.