gRPC Request Builder

Paste .proto content or manually enter a Service/RPC definition to generate a grpcurl command plus JavaScript, Python, and Go gRPC client call code.

FreeOnline Tool
Loading…

How to Use

  1. Choose an input mode: A) paste .proto file content — the tool uses regex to extract the package, service, and rpc method definitions (including request/response message types); or B) manual mode — directly enter the service name, RPC method name, request/response message types, and package.
  2. In proto mode, the "Parsed Result" panel updates live as you paste, showing the extracted package, service, and RPC list, and auto-fills the first RPC's details into the manual-mode fields for reference.
  3. Fill in "Server Info": server address (host:port), the request message (as JSON), and Metadata (as JSON, for auth headers and similar).
  4. Click one of the "Load Sample" buttons — Greeter, RouteGuide, or Health Check — to load a matching .proto example and request parameters instantly.
  5. Switch between the four output tabs (grpcurl command, JavaScript/TS, Python, Go) to see the full call code for each, and click "Copy" to grab it.

Features

  • Two input modes: paste .proto text for automatic extraction (regex-based parsing of package/service/rpc definitions), or manually fill in the service/RPC/message-type fields.
  • The proto parser currently only handles simple, cleanly formatted service blocks (regex-matching rpc method name, request type, and response type) — it is not a full Protocol Buffers grammar parser, so complex .proto files (nested messages, imports, oneof, the stream keyword) may not be fully recognized.
  • Generates grpcurl commands: a reflection-based service list command, a list-methods command, an invoke command (with a -d JSON payload), and a fallback command with -import-path/-proto for servers without reflection enabled.
  • Generates JavaScript/TypeScript client code (based on @grpc/grpc-js + @grpc/proto-loader), including metadata setup and callback handling.
  • Generates Python client code (based on grpcio), including channel/stub creation, request construction, and grpc.RpcError exception handling.
  • Generates Go client code (based on google.golang.org/grpc), including connection setup, a timeout context, and metadata injection.
  • Three built-in sample scenarios: Greeter (a basic greeting service), RouteGuide (a route service with a streaming method), and Health Check (the standard gRPC health-check protocol).
  • All generated output is text templates — the tool never actually makes a gRPC call to the server address you entered (and browsers can't natively make raw gRPC calls anyway).

Use Cases

Smoke-test a gRPC endpoint with grpcurl
A new gRPC service just went live and you want to test it from the command line — enter the proto or method info here and copy the generated grpcurl command straight into your terminal instead of hand-assembling the -d payload and fully-qualified method path.
Align client code across languages for the same RPC
Front-end uses JS, the ML team uses Python, and infra uses Go, but they all call the same gRPC endpoint — generate all three languages' call code from one proto in a single pass instead of everyone separately hunting through SDK docs.
Learn the basic shape of a gRPC client
New to gRPC and want to see how grpc.insecure_channel + Stub works in Python, or how grpc.Dial + a context timeout is set up in Go — use the generated code as a learning reference.
Quickly produce an authenticated call example with Metadata
The endpoint requires a Bearer token in gRPC metadata — fill in the metadata JSON once and all four generated code samples automatically include the matching metadata/header setup, without looking up each language SDK's metadata syntax separately.

FAQ

Does this tool actually make a gRPC call to the server address I enter?
No. It only assembles command and code text locally in your browser based on your inputs — no network request is made. In fact, browsers can't natively make raw gRPC (HTTP/2 + Protobuf) calls at all; the generated code needs to run in an environment that supports gRPC, such as a terminal, or a Node.js/Python/Go program.
Does the .proto parser support full Protocol Buffers syntax?
No. The current parser is regex-based and can only extract cleanly structured definitions like "service X { rpc Y (Req) returns (Resp); }". Nested messages, imports of other .proto files, oneof, and complex comments may not extract correctly or at all — check the "Parsed Result" panel after pasting, and switch to manual mode to fill in gaps if needed.
What happens if the proto uses the stream keyword (streaming RPC)?
The regex only extracts the rpc method name, request type, and response type — it doesn't detect the stream keyword. Generated call code is always written as a unary call; for streaming RPCs (server streaming, client streaming, bidirectional) you'll need to manually adapt the generated code to your language SDK's streaming call syntax.
What does "reflection" mean in the grpcurl commands, and what if my server doesn't support it?
gRPC reflection lets grpcurl discover service interfaces without a local .proto file — the list-related commands rely on the server having reflection enabled. If it doesn't, use the fallback command the tool also generates (with -import-path and -proto flags pointing to a local .proto file).