Developer & system utilities
Unix timestamp converter
Decode epoch timestamps into readable dates and encode any date back to Unix time — seconds, milliseconds, and microseconds detected automatically, with UTC, ISO 8601, and your local time ready to copy.
Timestamp to date
Enter a number in seconds, milliseconds, or microseconds.
Date to timestamp
Pick a date and time.
How to use the unix timestamp converter
Paste the number
Drop in the epoch value you have. The unit is detected from its magnitude — ten digits is seconds, thirteen is milliseconds, sixteen is microseconds — so you rarely have to say which you meant.
Read it in context
You get the instant as UTC, as your own local time, and in ISO 8601 form, which is usually enough to confirm whether the value is the one you were expecting.
Convert the other way
Enter a date and time to get its epoch value, for filling in a query parameter or a test fixture.
Sanity-check the magnitude
If a timestamp resolves to 1970 you have passed milliseconds to something expecting seconds, or the value is zero. If it lands in 55000 AD, it is the reverse.
Unix time, and the mistakes it invites
Unix time counts seconds since 1 January 1970 UTC. Its great virtue is that it is a single integer with no zone, no calendar and no ambiguity: the same instant has the same value everywhere on Earth. That is why it is the default representation in almost every system that has to compare or store times.
The most common bug in practice is a unit mismatch. JavaScript's Date.now() returns milliseconds; most Unix APIs, databases and standard library functions use seconds. Pass one where the other is expected and you get a date in 1970 or fifty thousand years hence — obvious when you look, easy to miss in a pipeline. Checking digit count is the fastest diagnosis: ten digits is seconds through to 2286, thirteen is milliseconds.
Unix time is not a count of elapsed SI seconds, which surprises people. It is defined to ignore leap seconds, so a leap second is represented by repeating a value rather than advancing past it. This keeps the conversion to a calendar date simple at the cost of the count being very slightly out of step with atomic time. For nearly all software that trade is the right one.
The 2038 problem is real but shrinking. A signed 32-bit counter overflows on 19 January 2038, and any system still storing time in a 32-bit integer will wrap to 1901. Modern platforms use 64-bit values, but embedded devices, old file formats and legacy database columns are still out there.
When you'd reach for it
Debugging an API response
Turn an epoch field into a readable date to check whether it is the value you expected.
Reading database rows
Decode integer timestamp columns during a query or a migration.
Checking token expiry
JWT iat and exp claims are epoch seconds; convert them to see whether a token has actually expired.
Writing test fixtures
Generate a specific epoch value for a fixed point in time.
Diagnosing a unit bug
Confirm quickly whether a seconds-versus-milliseconds mix-up explains a wrong date.
Correlating logs
Line up epoch timestamps from different systems against a human-readable clock.
Questions & answers
- What is a Unix timestamp?
- A Unix timestamp is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970 (the Unix epoch), not counting leap seconds. It's a compact, time-zone-independent way to represent an instant.
- How does it tell seconds, milliseconds, and microseconds apart?
- By magnitude. Values around ten digits are read as seconds, thirteen-digit values as milliseconds, and sixteen-digit values as microseconds. The detected unit is shown alongside the result.
- Which time zone is the date-to-timestamp conversion using?
- The date-and-time picker is interpreted in your browser's local time zone, then converted to an absolute Unix timestamp, which is the same worldwide.