Skip to content
browserutils

Nginx Config Generator

Generate nginx server block configuration

Nginx Config Generator is a free online tool from BrowserUtils that generate nginx server block configuration. It runs entirely in your browser — your data never leaves your device. No account required.

gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript;
gzip_min_length 256;

server {
    listen 80;
    server_name example.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_cache_bypass $http_upgrade;
    }
}

How to use Nginx Config Generator

  1. 1 Paste or type your input into the editor above.
  2. 2 The tool processes your data instantly — right in your browser, with nothing sent to a server.
  3. 3 Copy the result with one click or continue editing your input.

About Nginx Config Generator

Free online Nginx configuration generator. Create nginx server blocks for reverse proxy, static file serving, and SSL termination with gzip compression. This tool runs entirely in your browser — your data is never sent to a server. Just paste your input, get instant results, and copy with one click. No sign-up or installation required.

Nginx Config Generator specs

Runtime
100% client-side (browser)
Cost
Free — no account, no rate limits, no usage caps
Browser support
Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
Part of
299 developer tools on BrowserUtils (100% client-side)

Questions

What is an Nginx server block?
A server block (also called a virtual host) is a configuration block in Nginx that defines how to handle requests for a specific domain or IP. It specifies the listen port, server name, root directory, and proxy settings.
How do I set up Nginx as a reverse proxy?
Use the proxy_pass directive to forward requests to a backend server. This generator lets you specify the upstream URL, and it generates the proper proxy headers (X-Real-IP, X-Forwarded-For, X-Forwarded-Proto) automatically.
How do I enable SSL/TLS in Nginx?
Toggle the SSL option in this generator to produce a configuration with listen 443 ssl, certificate paths, and recommended security headers. You will need to provide your own SSL certificate and key files on the server.
How do I enable gzip compression in Nginx?
This generator includes a gzip configuration section that compresses text-based responses (HTML, CSS, JS, JSON). Gzip typically reduces transfer sizes by 60-80%, improving page load times without any client-side changes.
Is the generated Nginx config safe to use in production?
The configuration follows common security best practices including security headers and SSL settings. Always test in a staging environment first, and adjust worker processes, buffer sizes, and rate limiting for your traffic volume.
Embed this tool

Copy this code to embed the tool on your website. Adjust the height to fit your layout.

<iframe src="https://www.browserutils.dev/embed/nginx-config-generator" width="100%" height="500" frameborder="0" title="Nginx Config Generator"></iframe>

Related tools

More DevOps & Config

View all DevOps & Config tools