Transform your .proto files into JavaScript, TypeScript, JSON Schema, and more. Generate code, schemas, and documentation from your Protocol Buffer definitions.
Drag & drop a .proto file or paste content above
C struct definitions with function declarations, proper typedefs, and standard headers
C# classes with properties, data annotations, and nullable reference types
C++ header files with class definitions and proper includes
Dart classes with proper constructors, JSON serialization (toJson/fromJson), and Flutter-ready code
Elixir modules with structs, pattern matching, guards, and Jason JSON serialization
Go structs with JSON tags and protocol buffer field naming
Groovy classes with dynamic features, annotations for JSON binding, and builder pattern support
Java classes with builder pattern, getters/setters, and proper packaging
ES6 classes with validation and JSON serialization
JSON Schema definition for validation
Kotlin data classes with nullable types, kotlinx.serialization annotations, and modern Android patterns
PHP classes with type hints (PHP 7.4+ syntax), JSON serialization methods, and proper validation
Python dataclasses with type hints and validation
Ruby classes with attribute accessors, JSON serialization, and snake_case naming
Rust structs with Serde serialization, Option<T> for optional fields, and Vec<T> for arrays
Scala case classes with Option types for optional fields, functional programming patterns, and Play JSON support
Swift structs with Codable protocol, optional types for proto3 fields, and iOS development standards
TypeScript interfaces with type safety
Integrate proto2any into your development workflow or CI/CD pipeline.
# JSON body
curl -X POST https://proto2any.com/api/convert \
-H "Content-Type: application/json" \
-d '{"content": "syntax = \"proto3\";\npackage example;", "format": "javascript"}'
# File upload
curl -X POST https://proto2any.com/api/convert \
-F "file=@path/to/your.proto" \
-F "format=typescript"{
"success": true,
"format": "javascript",
"output": "/**\n * User class generated from proto definition\n */\nclass User {\n constructor(data = {}) {\n this.id = data.id ?? 0;\n this.email = data.email ?? '';\n // ... rest of the generated code\n }\n}"
}