tsconfig Generator

Pick a preset or toggle target, module, strictness, and lib options to generate a ready-to-use tsconfig.json.

Compiler Options

tsconfig.json

        
Copied!

Summary

Pick a preset or toggle target, module, strictness, and lib options to generate a ready-to-use tsconfig.json.

How it works

  1. Choose a quick preset (Node.js, React + Vite, Next.js, npm Library) or start from Custom.
  2. Set the target JavaScript version and module system for your build.
  3. Pick a module resolution strategy and, if needed, a JSX mode.
  4. Check which lib definitions to include, such as DOM or WebWorker.
  5. Toggle strictness and interop flags like strict mode and esModuleInterop.
  6. Set the output directory and root directory, then copy or download tsconfig.json.

Use cases

  • Bootstrapping a new TypeScript project without memorizing compiler option names.
  • Turning on strict type checking for an existing JavaScript codebase migrating to TypeScript.
  • Setting up a tsconfig.json for a React app built with Vite.
  • Preparing a tsconfig.json for a Next.js project with the correct JSX and module settings.
  • Generating a base config for an npm library that needs type declarations and source maps.
  • Checking which compiler options are recommended for a given module resolution strategy.

Frequently Asked Questions

Last updated: 2026-07-24 · Reviewed by Nham Vu