# Trace & span ID generator

Generate valid random trace and span IDs, as plain hex, traceparent headers or B3.

## How it works

A trace ID is 16 random bytes and a span ID is 8, written as lowercase hex. Neither may be all zeros.

## Questions

### Are these random enough?

They come from the browser’s cryptographic random generator.

### When would I need these?

For tests, fixtures and replaying a request with a known trace ID.

## Related tools

- [Traceparent parser & generator](https://powertraces.com/tools/traceparent)
- [OpenTelemetry setup generator](https://powertraces.com/tools/opentelemetry-setup)
- [Collector config builder](https://powertraces.com/tools/collector-config)
- [OTLP JSON validator](https://powertraces.com/tools/otlp-json-validator)

[All tools](https://powertraces.com/tools)
