Netlify Config Generator
Build a complete, valid netlify.toml visually — build command and publish/functions/base dirs, build environment variables and asset post-processing, plus row builders for redirects (with a SPA-fallback preset), custom response headers (with a one-click security-headers set), Build Plugins, a [dev] block and branch/context deploy overrides. The TOML renders live and an audit panel flags the mistakes people actually ship: a SPA rewrite missing status 200, a header path without a leading slash, or a missing publish directory.
About this ToolHow it works, benefits & use casesTap to collapse
netlify.toml is the file that drives every Netlify deploy, and its array-of-tables TOML syntax is easy to get subtly wrong by hand. This is a full builder, not a template gallery: it models the whole config and emits valid TOML live as you edit. Set the [build] section (command, publish, functions and base directories), add build environment variables and toggle Netlify asset post-processing ([build.processing] bundle/minify/compress). Then use row builders to add [[redirects]] (from to target with a 200/301/302/404/410 status, force, and a one-click SPA fallback preset for /* to /index.html 200), [[headers]] groups (a path plus Key/Value rows, with a one-click security-headers set), and [[plugins]]. A [dev] block configures netlify dev (command, port, targetPort), and branch/context blocks ([context.production], [context.deploy-preview]) let you override the command and publish dir per deploy context. A live audit panel flags the mistakes people actually ship, and five presets cover Next.js, Vite SPA, Hugo/static, a Functions API, and a Monorepo. Everything captures into a shareable URL.
How to Use
- 1Start from a preset (Next.js, Vite SPA, Hugo/static, Functions API, Monorepo) or build from scratch.
- 2Set the build command, publish directory, and optional functions/base directories, then add build environment variables.
- 3Add redirects with the row builder — set from, to, and a status; click "SPA fallback" for a /* to /index.html 200 rewrite.
- 4Add header groups for a path pattern and either type Key/Value rows or click "Security headers" to drop in a hardened set.
- 5Optionally add Build Plugins, a [dev] block for netlify dev, and per-context overrides for production and deploy previews.
- 6Watch the netlify.toml render live, read the audit panel, then copy or download the file to your repository root.
Key Benefits
- A true builder — build, env, processing, redirects, headers, plugins, dev and context blocks, not one fixed template
- A pure synchronous TOML emitter produces valid array-of-tables output that re-renders instantly as you edit
- A SPA-fallback preset and a one-click security-headers set for the two things everyone configures
- Row builders for redirects (200/301/302/404/410, force) and multi-row header groups per path
- A [dev] block and [context.production] / [context.deploy-preview] overrides for real-world deploys
- An audit panel that flags a SPA rewrite missing status 200, paths without a leading slash, and a missing publish dir
- Five framework presets and a shareable URL that captures the entire config for handoff
Common Use Cases
- Adding a SPA fallback with a 200 rewrite from /* to /index.html so the client router keeps the URL
- Attaching a hardened security-header set (X-Frame-Options, HSTS, Referrer-Policy) to all routes
- Configuring CORS headers on a /api/* Functions endpoint
- Setting build command, publish dir, base dir and per-context overrides for a package inside a monorepo
- Pinning NODE_VERSION and other build environment variables that Netlify uses to build the site
- Auditing a draft netlify.toml for a missing publish dir or a misconfigured redirect before committing it
0 redirects · 0 header groups · repo root
[build] command = "next build" publish = ".next" [build.environment] NODE_VERSION = "20" [[plugins]] package = "@netlify/plugin-nextjs"
Start from a preset
Build
Subdirectory Netlify cd's into before building.
Build environment
Asset post-processing
Netlify's bundle/minify/compress of your deployed assets.
Redirects
No redirects. Use “SPA fallback” for a /* → /index.html 200 rewrite.
Headers
No custom response headers.
Build Plugins
Local dev ([dev])
Controls how `netlify dev` runs your framework locally.
Deploy contexts
Overrides for production deploys.
Overrides for PR deploy previews.
A builder, not a template picker
netlify.toml drives every Netlify deploy — build settings, redirects, headers, plugins, and per-context overrides — and its array-of-tables TOML syntax is easy to get subtly wrong. This tool models the whole file and emits valid TOML live, with row builders for redirects and headers and one-click presets for the common frameworks.
What the audit catches
- A SPA fallback (
/* → /index.html) using a redirect status instead of200. - A header path or redirect
frommissing its leading slash. - A missing publish directory (with no framework plugin to set one).
- A non-numeric
[dev]port and empty header groups.
Was this tool helpful?
Share Your Experience
Help others discover this tool!
Related tools
- TOML to JSONConvert TOML to JSON format
- Tailwind Config GeneratorVisually build a Tailwind config - theme extend, colors, spacing, fonts, screens, plugins - and export it as a v3 JS config or a v4 @theme CSS block
- Changelog GeneratorGenerate changelog from Git commit history
- Component Name GeneratorTurn a description into ranked, kind-aware component names with a file scaffold and a name validator (casing, collisions, clarity)
- Markdown TOC GeneratorGenerate table of contents for Markdown
- Package.json Scripts GeneratorGenerate common npm scripts for different project types and workflows
A gallery hands you a frozen file you then hand-edit. This tool keeps a live model of the whole netlify.toml — build settings, redirects, headers, plugins, a dev block, and context overrides — and regenerates valid TOML on every change. You compose exactly the config you want and always get syntactically correct array-of-tables output, with an audit watching for common mistakes.
It adds a redirect from /* to /index.html with status 200. A 200 is a rewrite (proxy): Netlify serves index.html while keeping the requested URL in the browser, which is exactly what a client-side router needs. If you use 301 or 302 instead, the browser URL changes and deep links break — so the audit panel warns when a /* to index.html rule is not 200.

