DEVELOPER GUIDE

Unix Timestamps Explained: Seconds vs Milliseconds

Unix timestamps are common in APIs, databases, logs, and JavaScript applications. The most common source of confusion is whether a value is expressed in seconds or milliseconds.

The Unix epoch

Unix time measures an instant relative to the Unix epoch. Applications commonly serialize the value as an integer number of seconds or milliseconds.

Seconds vs milliseconds

A millisecond timestamp is typically three digits longer than the equivalent seconds value. JavaScript Date uses milliseconds internally, while many APIs use seconds.

Verify the contract

Never infer the unit only from a field name such as timestamp. Check the API or database documentation and test a known date.

Use the converter as a debugging aid

Our Timestamp Converter shows UTC, local time, Unix seconds, and Unix milliseconds so you can compare representations.

Related tools