JSON-RPC Builder — Compose and Validate JSON-RPC 2.0 Payloads
Build and validate JSON-RPC 2.0 request and notification payloads with method and params. Fill in the method name, optional params (named or positional), and an id — the tool validates the input against the JSON-RPC 2.0 specification and outputs a formatted payload plus a ready-to-run curl command. Supports requests, fire-and-forget notifications, and batch arrays. Five presets cover the most common patterns. Free and runs entirely in your browser.
How to Use JSON-RPC Builder — Compose and Validate JSON-RPC 2.0 Payloads
How to Use the JSON-RPC Request Builder:
Load a Preset (Optional): Click any preset to pre-fill all fields with a real-world JSON-RPC 2.0 example. Simple call shows a named-params request. Positional params demonstrates array-style params. No params builds a call without a params field. Notification shows a fire-and-forget call with no id. Batch shows how to combine multiple calls into a single HTTP request array. All presets can be edited after loading.
Choose the Request Type: The Type selector offers three modes. Request is the standard call-and-response pattern where the server returns a matching response keyed by the id. Notification is a fire-and-forget message — the id field is omitted and the server sends no response. Batch lets you paste one JSON-RPC object per line; the tool wraps them into an array and generates a single curl command that sends all calls at once.
Enter the Method Name: The method field is required. It must be a non-empty string with no spaces. Method names starting with rpc. (for example rpc.discover) are reserved by the JSON-RPC 2.0 specification for internal use and are rejected. Conventionally, methods use dot notation to namespace them: user.getProfile, payments.refund, math.subtract.
Enter Params (Optional): Paste a JSON object for named params ({"userId": "abc"}) or a JSON array for positional params ([42, 23]). The field is optional — if left empty, the params field is omitted from the payload entirely, which is spec-compliant. Invalid JSON triggers an inline error and blocks payload generation.
Configure the ID: For Request type, choose whether the id should be a number (most common), a string, or null. A null id is technically valid under the spec but is discouraged because it is indistinguishable from a notification in some implementations. The id is omitted automatically for Notification type.
Set the Endpoint URL: Enter the URL of the JSON-RPC endpoint you want to call. This is only used to generate the curl command — it does not affect the JSON payload itself. Leave the default placeholder if you only need the payload.
Read the Output: The right panel shows the formatted payload in real time. Switch to the curl tab to see a complete curl command ready to paste into a terminal. Both outputs can be copied individually using the Copy payload and Copy curl buttons at the bottom.
Fix Validation Errors: Any spec violation (missing method, invalid JSON params, reserved method name) displays a red inline error under the affected field. The payload output is hidden until all errors are resolved.
Common Use Cases:
- Manual API testing: Build a payload and run it with curl before writing client code, to confirm the server accepts the call shape.
- JSON-RPC endpoint development: Quickly generate valid request shapes to test new server-side method handlers during development.
- Learning JSON-RPC 2.0: Use the presets to explore the difference between requests, notifications, and batch calls without reading the spec from scratch.
- Debugging existing integrations: Re-build a known-good payload in the builder and compare it to what your client is sending to spot field-level differences.
- Batch operation testing: Compose multi-method batch arrays to test server-side batch handling and response ordering.
Tips and Best Practices:
- Prefer named params (JSON objects) over positional params (arrays) for methods with more than two arguments — they are easier to maintain and extend.
- The id field is what the server echoes back in its response to match requests and responses. Use a unique id per in-flight request when making concurrent calls.
- A notification (no id) is appropriate for logging, telemetry, and event reporting where you do not need a success or error confirmation.
- JSON-RPC 2.0 always requires "jsonrpc": "2.0" — the builder adds this automatically.
- Batch responses may arrive in any order and may omit responses for notifications in the batch. Match each response to its request using the id field.
Frequently Asked Questions
Most Viewed Tools
Screen Size Converter — Diagonal Dimension Tool
Calculate screen width and height from diagonal size and aspect ratio. Convert between inches and centimeters for displays, TVs, and monitors with instant dimension calculations.
Use Tool →DPI Calculator — Print Resolution Tool
Calculate DPI (dots per inch), image dimensions, and print sizes. Convert between pixels and physical dimensions for printing and displays.
Use Tool →TOTP Code Generator — 2FA Testing Tool
Generate time-based one-time passwords from a TOTP secret key. Enter your base32 secret, choose a period and digit length, and get the current and next codes with a live countdown timer. Useful for testing and debugging 2FA integrations.
Use Tool →Password Entropy Calculator — Crack Time Estimator
Calculate the information-theoretic bit entropy of any password or API key. Detects character set pools automatically, shows the total number of possible combinations, and estimates crack time across five attack scenarios from rate-limited web logins to GPU cracking clusters.
Use Tool →JSONL Formatter — Line-by-Line Validator
Format, validate, and inspect JSON Lines (JSONL) and NDJSON files. Validates each line individually, reports parse errors by line number, outputs compact JSONL or a pretty-print preview, and lets you download the cleaned file.
Use Tool →JSON to Zod — Schema Generator
Generate Zod validation schema code from a JSON sample object. Infers z.string(), z.number(), z.boolean(), z.array(), z.object(), and z.null() types automatically. Handles nested objects, arrays of objects with optional field detection, and outputs copy-ready TypeScript with import and z.infer type alias.
Use Tool →Seconds to Time Converter — HH:MM:SS Formatter
Convert seconds to HH:MM:SS time format instantly with precise calculations and easy-to-read formatting.
Use Tool →TLS Cipher Suite Checker — Strength Analyzer
Check TLS protocol version compatibility and cipher suite strength ratings against current best practices. Supports IANA and OpenSSL cipher names — rates each suite as Strong, Weak, or Deprecated and explains why.
Use Tool →Related API & Backend Tools
GraphQL Cost Estimator — Analyze Query Complexity and Depth
Assign custom field weights to a GraphQL schema and calculate the total query complexity score. Paste any GraphQL query, configure per-field costs, and get a per-field breakdown table showing depth, multipliers, and cumulative cost.
Use Tool →Webhook Retry Config Calculator — Simulate Exponential Backoff & Jitter
Configure exponential backoff parameters and preview the full retry schedule for webhook delivery. Enter max attempts, initial delay, multiplier, jitter, and a max delay cap to instantly see each retry timestamp, cumulative elapsed time, jitter range, and which delays hit the cap. Supports presets for standard, aggressive, conservative, Stripe-style, and fixed-interval retry policies. Free and runs entirely in your browser.
Use Tool →GraphQL Variables Formatter — Query Validator
Format and validate GraphQL query variables JSON for use in queries and API clients. Paste your variables JSON alongside a GraphQL query to instantly format the JSON, validate that each variable matches its declared type, catch missing required variables, and highlight undeclared extras.
Use Tool →API Mock Server Config Generator — Build Instant Mock Endpoints Online
Paste API route definitions to instantly generate JSON configuration files for json-server, Mockoon, and Prism mock servers. Define routes as METHOD /path lines and get ready-to-use config with realistic sample data.
Use Tool →Postman to OpenAPI Converter — Spec Migration Tool
Convert Postman Collection v2.1 JSON to OpenAPI 3.0 specification format. Upload or paste your collection, and get a downloadable openapi.yaml or openapi.json with mapped paths, parameters, request bodies, and example responses.
Use Tool →GraphQL Subscription Builder — Generate WebSocket Payloads and Client Queries
Build GraphQL subscription query strings and generate WebSocket connection code snippets for Apollo Client, urql, and graphql-ws. Define your operation name, variables, and selection fields visually, then copy the ready-to-use code.
Use Tool →OpenAPI Mock Generator — Turn API Specs into Live Mock Servers
Paste an OpenAPI 3.x or Swagger 2.0 spec, select any endpoint, and instantly get a realistic mock request body and response matching the defined schemas. Also generates a ready-to-run cURL command.
Use Tool →Server-Sent Events (SSE) Formatter — Build and Debug Real-Time Streams
Build Server-Sent Events messages with id, event, data, retry, and comment fields for testing SSE endpoints. Fill in each field individually and instantly see the correctly formatted SSE message string with double-newline terminator. Supports multi-line data fields, keep-alive comment lines, and an escaped wire-format view. Five presets cover the most common SSE patterns. Free and runs entirely in your browser.
Use Tool →Share Your Feedback
Help us improve this tool by sharing your experience