Class Validator Generator

Generate class-validator decorators from JSON input. Automatically infers types and produces TypeScript DTO classes with IsString, IsNumber, IsEmail, IsArray, and other decorators.

How to Use Class Validator Generator

Paste a JSON object and the tool generates a TypeScript class with class-validator decorators. It infers types for strings, numbers, booleans, emails, URLs, dates, arrays, and nested objects to produce ready-to-use DTO code.

Step-by-Step Instructions

  1. Enter a class name for your DTO
  2. Paste your JSON object into the input area
  3. Click Generate Decorators to produce the class
  4. Copy the generated TypeScript class with decorators

Related Tools

More Free Tools