Nginx to Caddyfile Converter

Convert Nginx configurations into clean, idiomatic Caddyfile v2 syntax instantly in your browser.

At a glance

Nginx to Caddyfile Converter is a free developer utility that transforms Nginx configuration blocks into modern Caddyfile v2 syntax. It automatically maps server names, reverse proxies (proxy_pass), static file roots, SPA try_files, headers, and redirects into clean Caddy directives client-side with zero telemetry or server calls.

Universal Switcher:
From:
To:

100% Client-Side Nginx to Caddyfile Converter

Zero Server Uploads

Transform Nginx server blocks, proxy_pass, static roots, SPA try_files, headers, and redirects into clean, idiomatic Caddyfile v2 syntax right in your browser.

Local Sandbox
Presets:
0 lines • 0 chars
Caddyfile Options
Waiting for input
Site Blocks 0
Reverse Proxies 0
TLS Automation Automatic

Why Use This Nginx to Caddyfile Converter?

100% Client-Side Privacy: All Nginx configurations and Caddyfiles are processed strictly in browser memory.
Automatic TLS Mapping: Safely strips redundant ssl_certificate directives in favor of Caddy automated Let's Encrypt / ZeroSSL HTTPS.
Reverse Proxy & Subpath Translation: Cleanly maps proxy_pass and location paths with wildcard prefix matchers.
SPA History Fallback: Translates Nginx try_files $uri $uri/ /index.html into Caddy try_files {path} {path}/ /index.html.
Header & Compression Preservation: Converts add_header and gzip on into modern Caddy header and encode gzip zstd syntax.

How to Use Nginx to Caddyfile Converter

1

Input Nginx Configuration

Paste your Nginx server block or location configuration, or choose one of our quick presets.

2

Configure Caddyfile Options

Toggle automatic TLS stripping and modern compression (gzip/zstd) as required for your environment.

3

Copy or Download Caddyfile

Copy the generated Caddyfile v2 configuration to your clipboard or download it directly.

Converting Nginx Reverse Proxy to Caddyfile

Demonstrates converting a standard Nginx reverse proxy server block into clean, idiomatic Caddyfile v2 syntax with automatic HTTPS.

Nginx Configuration (nginx.conf) Source
server {
    listen 80;
    server_name example.com;
    location / {
        proxy_pass http://127.0.0.1:3000;
    }
}
Caddyfile v2 (Caddyfile) Processed
example.com {
  reverse_proxy 127.0.0.1:3000
}

Technical Specifications & Engine Details

Technical specifications and engine details for Nginx to Caddyfile Converter
Specification Details
Supported Formats CONF, NGINX, TEXT → CADDYFILE, CADDY, TEXT
Execution Mode 100% Client-Side In-Browser (client)
Browser Requirements Modern browser with JavaScript enabled.
Performance Constraints 100% Client-Side. Runs locally in browser JavaScript memory.
Maintained by Pragyan Pahadi

100% Client-Side Privacy Guarantee

All Nginx configuration parsing and Caddyfile generation execute client-side in browser memory. Zero server infrastructure data leaves your device.

Frequently Asked Questions

Does this converter upload my Nginx server configuration?
No. The converter runs 100% client-side in your browser JavaScript memory. Zero configuration files or sensitive upstream hostnames are ever sent to external servers.
How does Caddy handle SSL/TLS compared to Nginx?
Unlike Nginx which requires manual ssl_certificate and ssl_certificate_key paths, Caddy provisions and renews SSL certificates automatically via Let's Encrypt or ZeroSSL. The converter strips redundant certificate paths.
How are Nginx location paths mapped to Caddy?
Nginx locations such as location /api/ are converted to Caddy path matchers such as reverse_proxy /api/* backend:8080.
Can it handle Single Page Applications (SPAs)?
Yes. It translates Nginx try_files $uri $uri/ /index.html into Caddy's try_files {path} {path}/ /index.html along with the companion file_server directive.

Methodology

This tool runs entirely in your browser. The example above shows a representative input and the result it produces.

Last updated .