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
- Enter a class name for your DTO
- Paste your JSON object into the input area
- Click Generate Decorators to produce the class
- Copy the generated TypeScript class with decorators
Related Tools
JSON Formatter and Validator
Format, validate, and pretty-print JSON with syntax highlighting.
Base64 Encoder and Decoder
Encode text to Base64 or decode Base64 strings back to plain text.
URL Encoder and Decoder
Encode special characters for URLs or decode percent-encoded strings.
HTML Entity Encoder and Decoder
Encode special characters as HTML entities or decode them back.