Results will appear here after validation...
What is NGINX Config Validator?
NGINX configuration files use a declarative syntax with braces, semicolons, and nested blocks (http, server, location). A single missing semicolon or unmatched brace can prevent NGINX from starting. This validator checks your config for syntax errors and common security issues before you deploy.
How to Use
- Paste your NGINX configuration into the editor on the left
- Click Validate to check for syntax and security issues
- Review errors (must fix) and warnings (should fix) in the results panel
- Fix the issues and re-validate until no errors remain
- Use Load Sample to see a basic valid configuration example
Why Use This Tool?
Tips & Best Practices
- Always run nginx -t on your server after deploying — this tool catches common errors but can't replace the real test
- Add server_tokens off; in the http block to hide your NGINX version from attackers
- Use include directives to split large configs into manageable files
- Test SSL configs with ssl-config.mozilla.org for modern cipher recommendations
- Consider adding security headers: X-Frame-Options, X-Content-Type-Options, and Strict-Transport-Security
Frequently Asked Questions
What does this NGINX config validator check?
It checks for syntax errors like unmatched braces, missing semicolons, unknown directives, and common security issues like missing server_tokens off, unsecured alias paths, and missing security headers.
Can this replace nginx -t?
No, nginx -t is the definitive test that runs against your actual NGINX installation with all modules. This tool provides a quick browser-based syntax check for common errors before deploying.
Is my config data secure?
Yes, all validation happens in your browser using JavaScript. Your NGINX configuration is never sent to any server.
What security issues does it detect?
It checks for: missing server_tokens off, potential path traversal in alias directives, missing security headers, unsecured locations, and other common misconfigurations.
Why is my directive flagged as unknown?
The validator has a built-in list of common NGINX directives. If you use third-party module directives (like lua_*, ndk_*, etc.), they may be flagged as unknown. You can safely ignore these warnings if the directive comes from an installed module.