Unix timestamp converter

Convert between epoch timestamps and readable dates, with seconds and milliseconds shown side by side so a units mix-up is obvious rather than silent.

Runs in your browser — nothing is uploaded
Open the unix timestamp converterSee all 16 tools

Seconds or milliseconds

Nothing in the number says which it is. A value near 1.7 billion is seconds; near 1.7 trillion is milliseconds. Feeding seconds to a millisecond parser gives you 1970; the reverse gives a date tens of thousands of years out. This is the most common timestamp bug there is, and showing both at once is the fastest way to spot it.

The 2038 problem

A signed 32-bit seconds counter overflows at 2038-01-19T03:14:07Z and wraps to 1901. It still affects 32-bit builds, embedded devices and MySQL TIMESTAMP columns, whose documented range ends on exactly that date. Test with a date past it, not merely a large one.

Zero and negative

A UI showing "1 January 1970" is rendering an unset value as a date. And dates before 1970 are negative, which unsigned columns and some parsers reject outright, so dates of birth are a reliable way to find the bug.

Questions

Is this timestamp in seconds or milliseconds?

If it is around 1.7 billion it is seconds. Around 1.7 trillion, milliseconds. The converter shows both interpretations so you can see which one gives a sensible date.

What happens in 2038?

A signed 32-bit epoch overflows at 2038-01-19T03:14:07Z and wraps to 1901. MySQL TIMESTAMP is affected; DATETIME is not.

Why does my app show 1 January 1970?

A null, zero or empty value is being formatted as a timestamp. Epoch zero is exactly that date.

Can epoch timestamps be negative?

Yes, for any date before 1970. Unsigned storage and naive parsers reject them, which breaks dates of birth.

Related

Date and time formats in fullJWT exp and nbf claims

Other tools

Hash generatorFile hash and checksum verifierUUID generatorURL parserTest image generatorFake test-data generator