About this tool
Generate a netlify.toml with build settings, redirects, security headers, functions and edge function routes.
This generator assembles a valid netlify.toml — Netlify's file-based configuration format — covering the [build] block, [build.environment], [[redirects]], [[headers]], [functions] and [[edge_functions]] sections. It is built for developers deploying static sites, SPAs and serverless apps to Netlify who want correct TOML syntax, valid redirect status codes and OWASP-baseline security headers without hand-writing the file.
Open Netlify TOML Generator on AltFTool — it loads instantly in your browser.
Provide your input — an image, text, or data.
Let the tool analyze or generate the result.
Review, refine, and reuse the output wherever you need it.
Redirect rules are limited to the statuses Netlify's engine accepts — 301, 302, 200 rewrites, 404, 410 and 451.
One-click OWASP-baseline headers and a 2-year HSTS policy matching the hstspreload.org requirement.
Quotes, backslashes and newlines in commands and values are escaped per the TOML spec, so the file always parses.
Add a rewrite from /* to /index.html with status 200 in netlify.toml — the [[redirects]] block this generator creates with the SPA fallback checkbox. Status 200 makes it a rewrite rather than a redirect, so the URL stays the same while index.html is served and your client-side router takes over.
A 301 (or 302) sends the browser to the new URL and the address bar changes; a 200 rewrite serves the target content at the original URL without the browser knowing. Rewrites are used for SPA fallbacks and for proxying to external APIs, since the to field can be a full https:// URL.
Yes — for any setting defined in both places, the netlify.toml value wins over the UI configuration. That is why teams commit the file to version control: the build command, publish directory and environment are reviewed like any other code change.
By default Netlify serves an existing static file instead of applying a matching redirect rule; force = true makes the rule win even when a file exists at that path. Without it, a /* SPA fallback will not shadow real files — which is usually what you want — and with it you can deliberately override published content.