Skip to content
Run here 100% in your browser, no upload, no login

htaccess to Nginx

Convert Apache .htaccess rules to Nginx config with a real mapping table.

Converted / needs manual work

Rules that need manual handling

    The mapping is line based and conservative: anything without a reliable equivalent is kept as a commented note so nothing is dropped silently.

    How to use it

    1. Paste your .htaccess into the left panel, or press Sample to see a realistic file converted.
    2. Press Convert — the right panel shows a server block with the mapped directives.
    3. Read the counter above the panels: it shows how many rules were mapped and how many need manual work.
    4. Read the Rules that need manual handling list below; every entry is the original line, also kept as a comment in the output.
    5. Copy or download the result as nginx.conf, then review it before deploying.

    The converter is line based and deliberately conservative. Anything without a trustworthy equivalent stays visible instead of being thrown away.

    Common use cases

    Why it stays private

    Conversion runs on the text in your browser. Configuration files often contain internal hostnames and paths, and none of that leaves your machine.

    FAQ

    Q: Why is some output marked for manual review? A: Some Apache directives have no direct Nginx equivalent — PHP settings, environment matching, and custom handlers among them. Guessing would produce a config that looks done and fails at reload, so those lines are flagged instead.

    Q: Do I still have to check the result? A: Yes. Nginx evaluates rewrite rules differently from Apache: patterns are matched against the URI with a slash at the front, and if inside location has known caveats. Treat the output as a strong draft, not a drop-in file.

    Q: Are RewriteCond conditions converted? A: Where a direct equivalent exists, yes: server variables map to Nginx variables, file tests become -f and -d checks, and conditions become enclosing if blocks. Conditions using [OR] are noted, because Nginx if cannot express them.

    Your data stays on this device

    htaccess to Nginx runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.

    Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.