Paste an epoch number to get the date, or pick a date to get the epoch. Seconds, milliseconds and microseconds are detected for you, in any time zone, with ISO 8601, RFC 2822, relative time, batch conversion and code.
Unix time is a single running count of seconds. It started at zero at midnight UTC on 1 January 1970 and has gone up by one every second since. Because it is just a number, computers can store it in a small space, compare two moments with a subtraction, and sort events without caring where they happened. That is why log files, databases, APIs, cookies, JWT tokens and file systems use it.
The count deliberately ignores leap seconds. When one is added to UTC, Unix time either repeats a second or stretches it, depending on the system, so every Unix day is exactly 86,400 seconds. For almost all software that is a feature: it keeps date arithmetic simple. If you need to measure intervals to the exact second across a leap second, use a monotonic clock instead of wall-clock time.
The classic Unix timestamp is in seconds, and that is what most databases, PHP, the shell and many APIs use. JavaScript and Java count milliseconds. Python's time.time() returns seconds as a decimal fraction. Some databases and tracing tools store microseconds, and Go's UnixNano or Linux clock_gettime can give nanoseconds.
Mixing them up is the most common timestamp bug. A seconds value read as milliseconds lands in January 1970; a milliseconds value read as seconds lands tens of thousands of years in the future. This converter shows every unit side by side so you can copy whichever the receiving code expects.
A timestamp has no time zone. The zone appears only when you turn it into a calendar date and clock time, and the same instant reads differently in Tokyo, Paris and Los Angeles. The table of world clocks on this page shows that directly.
Going the other way needs care. To get a timestamp from a local date and time, you must say which zone that clock reading belongs to, and the offset of that zone can change during the year. This tool looks up the real offset for the date you enter, using the time zone database built into your browser, so 12:00 in London is read as UTC+1 in July and UTC+0 in January. Twice a year a local time is either skipped (clocks go forward) or happens twice (clocks go back). For a skipped time the tool moves to the first valid moment after the gap.
Older C programs and some file formats keep time_t as a signed 32-bit number. Its largest value, 2,147,483,647, is reached at 03:14:07 UTC on Tuesday 19 January 2038. Paste 2147483647 into the converter to see it, then add one to see why it matters: a 32-bit field cannot hold the result and wraps to -2147483648, which is 13 December 1901.
If you design a database table or file format today, store timestamps as 64-bit integers or as a native timestamp type. In MySQL, the TIMESTAMP column type has historically been limited to 2038, while DATETIME and BIGINT columns are not.
It is the number of seconds since 00:00:00 UTC on 1 January 1970, a moment called the Unix epoch. 0 is that instant, 86400 is exactly one day later, and negative numbers are dates before 1970. Leap seconds are not counted, so every day is exactly 86,400 seconds long in Unix time.
Count the digits. For dates between roughly 2001 and 2286, seconds have 10 digits and milliseconds have 13. Microseconds have 16 and nanoseconds 19. This converter does that check for you and tells you which unit it assumed, and you can override it.
No. A Unix timestamp names one instant, the same everywhere on Earth. 1700000000 is 22:13:20 in London (UTC) and 17:13:20 in New York on the same day. The time zone only changes how the instant is written as a date and clock time.
Systems that store Unix time in a signed 32-bit integer can count up to 2,147,483,647, which is 03:14:07 UTC on 19 January 2038. One second later the number overflows and wraps to a negative value, which reads as December 1901. Modern operating systems and languages use 64-bit time, but old embedded devices, file formats and database columns declared as 32-bit integers can still be affected.
Date.now() and getTime() return milliseconds, not seconds. Divide by 1000 and round down to get Unix seconds, and multiply by 1000 before passing seconds to new Date().
No. The converter runs entirely in your browser. Timestamps, dates and batch lists are never uploaded.
Both describe a date, time and offset. ISO 8601 looks like 2023-11-14T22:13:20Z, puts the largest unit first and is the usual choice for APIs and JSON. RFC 2822 looks like Tue, 14 Nov 2023 22:13:20 +0000 and is the format required in email headers and used by RSS.
Related: Color palette generator, CSS grid generator, CSS clip-path generator, All free tools.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.