Skip to content

Free tool - no signup

tsconfig.json Generator

Pick a preset, flip the options you care about, and copy a ready compilerOptions block. It all runs in your browser - nothing is uploaded.

Preset
Options
tsconfig.json

Frequently asked questions

What does this tsconfig generator do?

It builds a ready-to-paste tsconfig.json from a preset plus a few toggles. Choose a target scenario (a strict app, a Node library, a monorepo package, or a bundler-driven project), flip the options you care about, and copy the JSON. Everything runs in your browser, so nothing is sent anywhere.

Which preset should I pick?

Use "Strict app" for most application code, since it turns on every strictness flag and catches the most bugs. Pick "Node library" when you publish a package that emits its own JavaScript and type declarations. Use "Monorepo package" for composite projects with project references, and "Bundler" when a tool like Vite or esbuild does the emit and TypeScript only type-checks.

Why does the strict preset enable noUncheckedIndexedAccess?

Because array and record lookups can return undefined, and the default TypeScript settings pretend they never do. noUncheckedIndexedAccess makes arr[i] typed as T | undefined, which forces you to handle the missing case. It is stricter than the base strict flag and catches a whole class of runtime crashes, so the app preset opts you in.

Is module: nodenext or bundler right for me?

Use NodeNext (with moduleResolution NodeNext) when Node runs your output directly, because it honors package.json exports and the ESM/CJS rules Node enforces. Use the Bundler resolution when Vite, esbuild, or a similar tool resolves your imports, since it relaxes the extension rules a bundler already handles for you.