01What is Traceparent Decoder?
Traceparent Decoder reads the headers that distributed tracing systems such as OpenTelemetry pass between services. When a trace breaks between two services, a malformed header is a common cause. This tool shows you quickly whether the header itself is the problem. Paste a traceparent value, with or without the "traceparent:" prefix. The tool splits it into version, trace-id, parent-id and trace-flags, following the W3C Trace Context recommendation. It checks that each field is lowercase hex of the right length: 2, 32, 16 and 2 characters. The W3C spec also says some values are invalid, so the tool rejects version ff and all-zero trace-id or parent-id values. Version 00 must be exactly 55 characters. For a higher version, extra data after the first 55 characters is accepted when it starts with a dash, as the spec asks for forward compatibility. The flags byte is shown as sampled (bit 0) and random trace-id (bit 1, added in Trace Context Level 2). For a worked example, paste the sample from the W3C spec: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01. The tool reports version 00, trace-id 4bf92f3577b34da6a3ce929d0e0e4736 and parent-id 00f067aa0ba902b7. Flags 01 means sampled is on and the random flag is off. If you change the last field to 03, both flags show as on. If you write the IDs in upper case, the tool reports an error, because the spec requires lowercase hex. An optional tracestate box lists each vendor entry and flags keys that break the key grammar, including the tenant@system form. It also flags values with commas, equals signs or a trailing space, duplicate keys, and more than 32 entries. These limits come from the tracestate section of the W3C Trace Context spec. An optional baggage box decodes W3C baggage. It percent-decodes each value, shows properties after a semicolon, and flags keys that are not HTTP tokens and characters that should have been percent-encoded. It also flags more than 64 entries or more than 8192 bytes, the limits named in the W3C Baggage spec. The Generate tab makes a new version 00 traceparent with IDs from crypto.getRandomValues. It never returns an all-zero ID. You can set the sampled and random flags and roll a new parent-id for a child span. The tool does not contact any tracing backend, so it cannot tell you whether a trace exists. It only checks format. Everything runs in your browser.
Backend and platform engineers debugging distributed tracing and context propagation between services. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Traceparent Decoder
- Paste the traceparent value, with or without the traceparent: prefix
- Optionally paste the tracestate and baggage values
- Read the decoded fields and fix anything marked in red
- To make a new header, open Generate, choose the flags and copy the result
- Use New parent-id to get a child span ID within the same trace
03Worked examples
- Input:
00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01 - Result:
valid; version 00; trace-id 4bf92f3577b34da6a3ce929d0e0e4736; parent-id 00f067aa0ba902b7; flags 01 (sampled: yes, random trace-id: no) - The example header from the W3C Trace Context spec.
- Input:
00-a3ce929d0e0e47364bf92f3577b34da6-b9c7c989f97918e1-02 - Result:
valid; flags 02 (sampled: no, random trace-id: yes) - Flags 02 sets only the random trace-id bit from Trace Context Level 2. Output trimmed to the flags.
- Input:
00-4bf92f3577b34da6a3ce929d0e0e4736-0000000000000000-01 - Result:
invalid: parent-id of all zeros is invalid. - An all-zero parent-id is reserved as invalid by the spec.
- Input:
ff-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01 - Result:
invalid: Version ff is invalid. - Version ff is forbidden, so parsing stops before the other fields.
- Input:
tracestate: Vendor=1,rojo=a,rojo=b - Result:
Vendor: Key must be lowercase: letters, digits, _ - * /, optionally tenant@system. rojo=b: Duplicate key. - tracestate keys must be lowercase and each key may appear only once.
- Input:
baggage: userId=alice,serverNode=DF%2028,isProduction=false;ttl=60 - Result:
userId = alice; serverNode = DF 28; isProduction = false (properties: ttl=60) - Baggage values are percent-decoded and anything after ; is a property of that member.
04Common use cases
- Checking why a downstream service starts a new trace instead of joining the caller's
- Reading the trace-id from a log line so you can search for it in your tracing UI
- Creating a valid traceparent to send with curl when testing a traced endpoint
- Spotting uppercase hex or all-zero IDs written by hand-rolled propagation code
- Decoding percent-encoded baggage values copied from a request
05Tips
- Trace Context requires lowercase hex; uppercase IDs are invalid
- A sampled flag of 0 means the caller did not record the trace, not that the header is broken
- Only set the random flag when at least the right-most 7 bytes of the trace-id are random
- Percent-encode spaces, commas, semicolons and quotes in baggage values
06Related concepts
W3C Trace Context, traceparent, tracestate, baggage, OpenTelemetry, distributed tracing.
Frequently Asked Questions
What is Traceparent Decoder?
Traceparent Decoder is a free, browser-based developer tool on AIDToolStack. Decode and validate W3C Trace Context traceparent and tracestate headers and W3C baggage, or generate a new traceparent with random IDs in your browser. It requires no installation or sign-up and works entirely in your browser.
Is Traceparent Decoder free to use?
Yes. No sign-up, no fees and no usage cap.
Does Traceparent Decoder store my data?
No. It runs in your browser; nothing is uploaded.