Summary
JSON → TypeScript uses the root-name textbox verbatim when generating the root interface. Names containing a hyphen or beginning with a digit produce invalid TypeScript declarations.
Affected route: https://byteflow.tools/en/json-to-typescript
Reproduction
Use this valid JSON input:
Set the Root: field to user-profile.
Actual output:
export interface user-profile { id: number; }
This is parsed as an invalid interface name because - is not allowed in a TypeScript identifier.
Set the Root: field to 123.
Actual output:
export interface 123 { id: number; }
This is also invalid TypeScript because an identifier cannot start with a digit.
Expected
The tool should either sanitize the root name into a valid PascalCase identifier (for example UserProfile and Root123) or show validation feedback and require a valid identifier.
A normal root name such as ApiResponse generated valid nested interfaces and copied correctly during the same test.
Environment
- Browser: Chrome via cloud browser
- Tested: 2026-08-18
Summary
JSON → TypeScript uses the root-name textbox verbatim when generating the root interface. Names containing a hyphen or beginning with a digit produce invalid TypeScript declarations.
Affected route: https://byteflow.tools/en/json-to-typescript
Reproduction
Use this valid JSON input:
Set the
Root:field touser-profile.Actual output:
This is parsed as an invalid interface name because
-is not allowed in a TypeScript identifier.Set the
Root:field to123.Actual output:
This is also invalid TypeScript because an identifier cannot start with a digit.
Expected
The tool should either sanitize the root name into a valid PascalCase identifier (for example
UserProfileandRoot123) or show validation feedback and require a valid identifier.A normal root name such as
ApiResponsegenerated valid nested interfaces and copied correctly during the same test.Environment