Paste the rewrite rules from your .htaccess file to generate a starting point. This converter does not migrate every Apache directive.
Runs locally in your browserThe converter reads the rewrite rules of an .htaccess file and prints the Nginx lines that match them: RewriteRule becomes rewrite, RewriteCond becomes the if blocks that guard it. The work happens in the page, and the rules are never uploaded.
Only rewrite rules are translated. Everything else — RewriteBase, Redirect, Header, Options and similar Apache directives — is listed in a comment at the end of the result instead of being copied over, so you can see what still needs a decision.
RewriteRule lines become rewrite statements with the same pattern: [L] becomes last, [R=301] permanent, [R=302] and [R] redirect, and [NC] is written as an inline (?i) so the match stays case-insensitive. [E=NAME:value] becomes set $NAME value; — the form nginx accepts.
RewriteCond lines become if blocks that assign a $rule_N variable, and the rule they guard runs inside if ($rule_N = "..."). File tests map as well: -f becomes !-f when negated, -d stays -d, and -s becomes -e.
Apache directives without an Nginx equivalent are not dropped silently: the result ends with a comment listing them, together with rewrite flags such as S= or T= that have no Nginx counterpart.
[F], [G] and [P] rules are not converted either, because an unqualified 403 or a proxied rewrite would behave differently in nginx. The tool prints the rule and the construct to add by hand. A condition it cannot read is marked #ignored, and the rule it guarded stays inactive until that condition is rewritten.
Input is capped at 6,000 characters, so split large .htaccess files. The result is a starting point, not a finished configuration: quoting, location blocks and server context still depend on your setup.
Keep the generated block in a server block, run nginx -t, and test one redirect in a browser before the switch. The conversion runs locally in JavaScript, so the rules never leave the page and a run still works offline.