tsconfig.json Generator

Pick the kind of project, such as Node, React or a library, and get a tsconfig.json to start from.

tsconfig.json Generator

Developer Tools

Runs locally in your browser.

Generated locally in your browser — pick a project type and copy tsconfig.json.
tsconfig.json

About the tsconfig.json Generator

TypeScript projects use a tsconfig.json file to tell the compiler how the project is organised. Manually entering compiler options or recalling the nesting for different project environments can be error prone and cause frustrating compiler errors.

This tsconfig.json Generator tool allows you to swiftly define the necessary project configuration through an interactive GUI. The configuration is generated in your browser.

Key Features of tsconfig.json Generator

  • Interactive Project TypesSelect from common project types (e.g., Node.js CommonJS) to help define your compiler configuration for backend or frontend development.
  • ECMAScript TargetPick your target JavaScript version (e.g., ESNext) to define how newer TypeScript features should be transformed into older runtimes during compilation.
  • StrictnessToggle between available strictness options (e.g., Recommended Strict) to help enforce stricter type-checking during development to prevent common bugs.
  • Custom Output DirectoriesDefine the directory where your compiled code should be emitted (e.g., dist) after the build process has finished.
  • Local processingYour project settings stay on your device.
  • Instant Export OptionsCopy the generated JSON code or download the file directly as a tsconfig.json file for your project root directory.

How to Use tsconfig.json Generator

  1. Choose from common target environments found in the "Project type" dropdown.
  2. Pick your preferred JavaScript standard from the "ECMAScript target" dropdown.
  3. Define your type-checking rules using the "Strictness" dropdown.
  4. Set your preferred directory for compiled code using the "Output directory" field.
  5. Click on the "Generate" button to process your custom JSON configuration.
  6. Copy or download your generated file using the "Copy" or "Download" buttons respectively and click "Reset" to start over.

tsconfig.json Generator Examples

The configuration produced with the default choices. Check target and module against your runtime.

Input
Default options
Result
{
  "compilerOptions": {
    "target": "ESNext",
    "module": "CommonJS",
    "moduleResolution": "node",
    "outDir": "dist",
    "rootDir": "src",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "resolveJsonModule": true,
    "declaration": false,
    "sourceMap": true
…

tsconfig.json Generator — Frequently Asked Questions

What is a tsconfig.json file?
A tsconfig.json file defines the root of a TypeScript project and specifies the compiler options that should be used when compiling the codebase into executable JavaScript.
Why is strict mode recommended?
Enabling strict mode will cause the compiler to enforce stricter type-checking rules (e.g., checking for null/undefined and implicit any) to help identify potential issues at compile-time.
Is this tool safe for proprietary project setups?
Yes, this tool is built to respect user privacy by only processing the necessary information inside your browser. The project architecture details and compiler options you specify are never logged or sent over the internet.