Skip to content

Trace Context Validator — W3C traceparent

Validate W3C traceparent and tracestate headers for distributed tracing correctness and propagation safety

Trace Context Validator — W3C traceparent

{
  "checked": 3,
  "valid": 1,
  "invalid": 2,
  "results": [
    {
      "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
      "tracestate": "",
      "valid": true,
      "issues": []
    },
    {
      "traceparent": "00-00000000000000000000000000000000-00f067aa0ba902b7-01",
      "tracestate": "",
      "valid": false,
      "issues": [
        "trace-id cannot be all zeros"
      ]
    },
    {
      "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-0000000000000000-01",
      "tracestate": "vendor_a=foo",
      "valid": false,
      "issues": [
        "parent-id cannot be all zeros"
      ]
    }
  ]
}

Updated . Provided as is. Check the output before you rely on it in production.

How to use Trace Context Validator — W3C traceparent

  1. 1

    Paste trace headers line by line

    Add traceparent values, optionally followed by tracestate content on the same line, to validate real propagated headers.

  2. 2

    Run validation

    Click Validate Trace Context to parse each entry and check W3C format requirements and forbidden patterns.

  3. 3

    Inspect invalid reasons

    Review precise error reasons for malformed version, trace ID, span ID, flags, or tracestate members.

  4. 4

    Correct instrumentation output

    Fix emitter or proxy logic in your services, then rerun the validator with fresh headers until all entries pass.

Questions and answers

What is Trace Context Validator?
W3C Trace Context defines the traceparent and tracestate headers that carry a trace ID between services in distributed tracing. This validator checks each traceparent line for format, version ff, and all-zero trace or parent IDs, and checks tracestate keys and member count.
Which invalid patterns are detected?
The validator flags a traceparent that is not version-traceid-parentid-flags in lowercase hex of the right lengths, version ff, an all-zero trace ID or parent ID, malformed tracestate members or keys, and more than 32 tracestate members.
Can it validate tracestate entries too?
Yes. The tool validates tracestate member formatting and catches malformed key-value entries that can break downstream observability pipelines.
Does Trace Context Validator store or send my data?
No. Header validation runs entirely client-side and does not send trace metadata externally.
For AI agents: how to call this tool

Machine-readable contract, endpoints and examples. Humans can ignore this section.

Best Path For Builders

Browser workflow

Runs instantly in the browser with private local processing and copy/export-ready output.

Browser Workflow

This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.

/trace-context-validator/

For automation planning, fetch the canonical contract at /api/tool/trace-context-validator.json.