How to Convert a Unix Timestamp to a Date

Computer code and clock for timestamps
Photo: β€œAtomic Clock016” by National Institute of Standards and Technology Β· Public domain Β· via Wikimedia Commons

Short answer

Unix time counts seconds since 1970-01-01T00:00:00Z. Multiply by 1000 for JavaScript milliseconds. Example: 1700000000 β†’ 2023-11-14T22:13:20Z.

Logs and APIs love epoch integers. Convert them with the Unix timestamp converter.

Seconds vs milliseconds

Values near 1.7e9 are seconds; near 1.7e12 are milliseconds.

Time zones

Epoch is UTC. Display local time in your browser zone, or compare cities with the time zone converter.

Negative timestamps

Dates before 1970 use negative values in many systems.

Open the free date difference calculator.

Related: how to convert time zones.

Related: what is a uuid.

Related: how to fix invalid json.

More practice

Change the inputs, rewrite the formula from memory, then confirm with the tool. Keep units consistent and read the disclaimer on tax or health pages before acting on a number.

Frequently asked questions

What is Unix time?

Seconds since the Unix epoch (1 Jan 1970 UTC).

Why is my timestamp huge?

It may be milliseconds β€” divide by 1000 for seconds.

Does it include leap seconds?

Most platforms ignore leap seconds in Unix time.

Can I convert a date back to epoch?

Yes β€” paste an ISO date into the converter.