consolelog.tools

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 cases

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

  1. 1Start from a preset (Next.js, Vite SPA, Hugo/static, Functions API, Monorepo) or build from scratch.
  2. 2Set the build command, publish directory, and optional functions/base directories, then add build environment variables.
  3. 3Add redirects with the row builder — set from, to, and a status; click "SPA fallback" for a /* to /index.html 200 rewrite.
  4. 4Add header groups for a path pattern and either type Key/Value rows or click "Security headers" to drop in a hardened set.
  5. 5Optionally add Build Plugins, a [dev] block for netlify dev, and per-context overrides for production and deploy previews.
  6. 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"
Config looks valid

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 of 200.
  • A header path or redirect from missing 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