Unix Timestamp Converter

Convert Unix timestamps to dates and back, in seconds through nanoseconds.

Current Unix time

Timestamp to date

Date to timestamp

About Unix timestamps

A Unix timestamp counts the seconds since 00:00:00 UTC on 1 January 1970 — the Unix epoch. It has no timezone: the same instant is the same number everywhere on earth, which is exactly why it is the format to store and transmit. Timezones belong at the edges, when a time is shown to a person.

Seconds or milliseconds?

Unix tools, most databases and JWT claims use seconds — a 10-digit number today. JavaScript's Date.now(), Java and most JSON APIs use milliseconds, giving 13 digits. Go's UnixNano and many tracing systems use nanoseconds, at 19 digits. This tool infers the unit from the digit count, which stays reliable until the year 2286, and you can always set it manually.

Mixing the two is the most common timestamp bug there is: read a milliseconds value as seconds and your date lands in the year 57000; read seconds as milliseconds and everything appears to have happened in January 1970.

The year 2038 problem

Systems that store the timestamp in a signed 32-bit integer overflow at 2147483647 — 03:14:07 UTC on 19 January 2038 — and wrap around to 1901. Any modern system uses 64 bits and is unaffected, but the limit still surfaces in older embedded devices, legacy file formats and 32-bit database columns.

Negative timestamps

Dates before 1970 are negative, and this tool handles them. They are worth testing against, because plenty of code assumes a timestamp is positive — birth dates are the usual place this breaks.

Everything is computed locally

The conversion runs in your browser using its own timezone database, so the local times shown here are the ones your machine believes in. Nothing is sent anywhere.