Nginx config to Caddyfile
Convert an Nginx server configuration to an equivalent Caddyfile.
Nginx config to Caddyfile
Paste an Nginx configuration and this tool rewrites it as a Caddyfile, keeping the structure recognizable: each server block becomes a Caddy site address, and each location becomes a handle block matched on the same path. It is built for the common migration case — moving a working Nginx site to Caddy without re-learning the syntax from scratch.
The options control which parts get converted. Reverse proxy turns proxy_pass into reverse_proxy and carries proxy_set_header entries over as header_up, substituting Nginx variables like $host and $remote_addr for Caddy placeholders. Static files maps root, index and try_files to root, file_server and try_files. Redirects & rewrites turns return and rewrite into redir and rewrite, and TLS settings carries a certificate pair into a tls directive — worth noting, since Caddy issues and renews certificates automatically and that line is often removable. Compression & caching maps gzip to encode and flags proxy_cache, which has no built-in Caddy equivalent. Body size limit converts client_max_body_size into a request_body block with a matching max_size.
Nginx has directives Caddy simply doesn't, from SSL protocol pinning to auth_basic_user_file. Rather than guessing, the tool leaves those untouched and adds a commented note on what has no equivalent and what to check by hand — turn that off for plain output. Nested blocks parse correctly, so a location nested inside another location, or a server wrapped in an http block, comes through the same way. Both line-ending styles are handled, and the live tally reports lines in, directives converted and warnings raised.
Everything runs locally in your browser — your configuration is never uploaded anywhere, which matters when it contains internal hostnames or certificate paths. Copy the result, download it as a Caddyfile, or send it back into the input to refine the conversion further.