# NTP RFC 5905 / SNTP Leap Second & Epoch Decoder

Decode an NTP/SNTP 48-byte packet: LI/VN/Mode bitfield, stratum, poll, precision, root delay/dispersion, reference ID (with clock & kiss codes), and four 64-bit 1900-epoch timestamps

> Canonical page: https://elysiatools.com/en/tools/ntp-rfc-5905-sntp-leap-second-epoch-decoder

- **Category:** Development

- **Keywords:** ntp, sntp, leap second, rfc 5905, rfc 4330, timestamp, stratum, time sync, epoch, packet decoder

## Overview

Decodes NTP packets per RFC 5905 (NTPv4) and SNTP per RFC 4330. Parses the Leap Indicator (leap-second warning), Version, Mode, Stratum, Poll, Precision, Root Delay, Root Dispersion, Reference ID (stratum-1 clock-source codes and stratum-0 kiss-o'-death codes), and the four 64-bit timestamps (Reference, Origin, Receive, Transmit). Timestamps use the 1900-01-01 NTP epoch and are converted to UTC, with the TAI-UTC leap-second offset (currently 37 s) shown for context. Includes a byte-by-byte layout view and a reference-ID table. Pure local, deterministic, no network.

## Inputs

- **NTP packet (hex)** (textarea): Paste 96 hex characters (48 bytes). Spaces/colons OK. e.g. 24030de0 000005e4 0000059c 47505300 ...
- **Mode** (select)

## When to use

- Inspect an NTP or SNTP packet during time-synchronization troubleshooting.
- Verify Leap Indicator, version, mode, stratum, poll, precision, and delay fields.
- Convert NTP 1900-epoch timestamps and identify clock-source or kiss-o'-death reference codes.

## How it works

- Paste a 48-byte packet as hexadecimal, using optional spaces or colons between bytes.
- Select Decode packet to parse the header, numeric fields, reference ID, and timestamps.
- Review UTC conversions, the TAI-UTC leap-second context, and the byte-by-byte layout.
- Select Reference ID table to browse supported clock-source and kiss codes without decoding a packet.

## Use cases

- Diagnose unsynchronized NTP servers by checking stratum, Leap Indicator, and timestamp fields.
- Review GPS- or other clock-source-synchronized server responses through the reference ID and timing data.
- Study NTP packet structure with the byte-by-byte layout and reference ID code table.

## Frequently asked questions

### What input does the decoder accept?

It accepts a 48-byte NTP or SNTP packet as hexadecimal, with spaces or colons allowed.

### Which standards does it support?

It decodes NTPv4 according to RFC 5905 and SNTP according to RFC 4330.

### Which packet fields are decoded?

It decodes LI, version, mode, stratum, poll, precision, root delay, root dispersion, reference ID, and four 64-bit timestamps.

### How are NTP timestamps displayed?

The timestamps use the 1900-01-01 NTP epoch and are converted to UTC, with the current 37-second TAI-UTC offset shown for context.

### Does the tool send packets over the network?

No. The decoder is local, deterministic, and does not use the network.

## Related tools

- [Snowflake / Discord ID Bit Decoder](https://elysiatools.com/en/tools/snowflake-discord-id-bit-decoder): Decode 64-bit Snowflake-style IDs for Discord, Twitter, Mastodon, Sonyflake, Instagram, or a custom bit profile. Extract timestamp, worker/process/machine, sequence fields, align platform epochs, and infer a Discord shard when a shard count is supplied.
- [ULID / NanoID / KSUID / Snowflake ID Decoder](https://elysiatools.com/en/tools/ulid-nanoid-ksuid-snowflake-id-decoder): Decode lexically sortable IDs losslessly with BigInt: ULID (Crockford base32), KSUID (base62), NanoID, MongoDB ObjectId, and Discord/Twitter/Sonyflake Snowflakes — with ISO timestamps, raw hex, bit-level field breakdowns and birthday-bound collision probabilities.
- [Modern Unique ID Generator](https://elysiatools.com/en/tools/uid-generator): Generate modern unique identifiers: ULID, NanoID, Snowflake and CUID2. Compare formats, decode ULID timestamps and pick the right ID for your system.
- [Distributed Trace Decoder & Waterfall Visualizer](https://elysiatools.com/en/tools/distributed-trace-decoder-waterfall-visualizer): Decode Jaeger, Zipkin, or OpenTelemetry trace JSON and render span timing, dependencies, and error hotspots as an interactive waterfall report
- [WebSocket Frame Decoder](https://elysiatools.com/en/tools/websocket-frame-decoder): Decode raw WebSocket frames (hex or base64) byte by byte per RFC 6455: FIN/RSV/opcode, MASK bit, extended lengths, masking key, unmasked payload, close codes, and protocol-violation warnings.
- [Cron Expression Next Run](https://elysiatools.com/en/tools/cron-expression-next-run): Parse cron and show the next run in natural language, local time, UTC, countdown seconds, and Unix timestamps.
- [X.509 Certificate Decoder](https://elysiatools.com/en/tools/certificate-decoder): Parse an X.509 SSL/TLS certificate (paste PEM or upload .pem/.crt) and inspect subject, issuer, validity period with expiry status, public key, signature algorithm, serial, SANs, key usage and fingerprint. Like openssl x509 -text, visualised. Runs locally.
- [Leetspeak Decoder & Detector](https://elysiatools.com/en/tools/leetspeak-decoder-detector): Decode leetspeak (1337) to plain text and score how plausibly leet an input is — for password-policy bypass screening, profanity-filter evasion, and log-noise filtering.

## Samples

- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion

## Related content

- [Semi-Structured Text Parsing and Table Extraction Tools](https://elysiatools.com/en/hubs/semi-structured-text-table-extraction): Turn fixed-width text, mixed-delimiter records, logs, and HTML or Markdown tables into clean CSV, JSON, XML, or Excel outputs with focused parsing and repair tools.
