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
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.js —
NodeNextmodule/resolution,ES2022target, declaration + source maps, strict mode. - React —
ESNextmodules with a bundler resolution strategy andreact-jsxtransform. - Next.js — the module/JSX/resolution combination the Next.js compiler expects.
- Library — declaration output enabled,
isolatedModuleson, 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
liblist. - 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
- Pick a preset, or choose Custom and set every option yourself.
- Fill in your project's
paths/include/excludeif you use path aliases or a non-default source layout. - Copy the generated file into your project root as
tsconfig.json.
Runs entirely in your browser — nothing is uploaded.
Use it from code
From 3 credits per callREST API
curl -X POST https://api.iotools.cloud/v1/tool/tsconfig-json-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"preset": "node",
"includeComments": "true",
"includeHeader": "true"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `tsconfig-json-generator` tool (tsconfig.json Generator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.