Skip to main content

tsconfig.json Generator

Generate a TypeScript tsconfig.json from form fields: target, module, moduleResolution, JSX, lib, project layout (rootDir, outDir, baseUrl, path aliases, include/exclude), and every strictness, linting, and emit/interop compiler option. Start from a preset (Node.js, React, Next.js, Library, Strictest) or build a custom config; output is commented, ready-to-drop JSONC.

Input

Pick a curated starting point, or choose Default / Custom to configure every option by hand below.

Language & Modules

JavaScript version to compile down to. Ignored when a preset is selected.

Module system for emitted code.

How the compiler resolves import specifiers.

JSX emit mode. Required for React projects.

Comma-separated standard libraries (leave empty to use the target default). Examples: ES2022, DOM, DOM.Iterable, WebWorker, ESNext.

Project Layout

Root folder of input files. Leave empty to infer.

Output folder for emitted files. Leave empty to emit next to source.

Base directory for non-relative imports. Auto-set to "." if you add path aliases.

Path aliases, one per line as alias=target. Use * for wildcards.

Glob patterns to include, one per line. Defaults to all project files if empty.

Glob patterns to exclude, one per line.

Output Options

Output

Generated tsconfig.json
 
Was this helpful?

Guides

Build a tsconfig.json without memorizing the hundred-plus compiler options TypeScript exposes. Start from a preset that matches your project type, or dial in every option yourself, and copy out a ready-to-use, commented config file.

Presets

  • Node.jsNodeNext module/resolution, ES2022 target, declaration + source maps, strict mode.
  • ReactESNext modules with a bundler resolution strategy and react-jsx transform.
  • Next.js — the module/JSX/resolution combination the Next.js compiler expects.
  • Library — declaration output enabled, isolatedModules on, tuned for publishing a package.
  • Strictest — every strictness flag TypeScript offers, for teams that want maximum safety.
  • Custom — build the config field by field.

What it covers

  • Language & modules: target ECMAScript version, module system, module resolution strategy, JSX mode, and the lib list.
  • Project layout: rootDir, outDir, baseUrl, and path aliases (@/*src/*-style mappings).
  • Include/exclude globs.
  • Strictness & linting: strict, noUnusedLocals, noUnusedParameters, noFallthroughCasesInSwitch, noImplicitReturns, and more.
  • Interop & emit: esModuleInterop, allowSyntheticDefaultImports, forceConsistentCasingInFileNames, skipLibCheck, resolveJsonModule, isolatedModules, declaration, sourceMap, noEmit.

Toggle inline comments explaining each option, and an optional header comment crediting the generator — both are safe to strip for a production file, since tsconfig.json is parsed as JSONC (comments allowed).

How to use it

  1. Pick a preset, or choose Custom and set every option yourself.
  2. Fill in your project's paths/include/exclude if you use path aliases or a non-default source layout.
  3. Copy the generated file into your project root as tsconfig.json.

Runs entirely in your browser — nothing is uploaded.

tsconfigtypescriptconfiggeneratorcompiler optionsjsondeveloper tools

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.