Unix Timestamp Converter

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.

How it works

  1. The clock at the top shows the current Unix time and ticks every second. Copy it in seconds or milliseconds with one click.
  2. To read a timestamp, paste it into the first box. A 10-digit number is read as seconds, 13 digits as milliseconds, 16 as microseconds and 19 as nanoseconds. If the guess is wrong, choose the unit yourself.
  3. You can also paste a date string there, such as 2026-01-31 14:30 or an RFC 2822 date from an email header. Dates without their own offset are read in the time zone you picked.
  4. To go the other way, use the date and time fields under Date to timestamp. The result updates as you type and accounts for daylight saving in the chosen zone.
  5. For many values at once, paste one per line into Batch convert and download the result as CSV. Nothing is sent to a server; every conversion runs in your browser.

How Unix time works

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.

Seconds, milliseconds, microseconds and nanoseconds

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.

Time zones and daylight saving

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.

The Year 2038 limit

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.

Tips

Frequently asked questions

What is a Unix timestamp?

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.

How do I know if a timestamp is in seconds or milliseconds?

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.

Does a Unix timestamp depend on the time zone?

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.

What is the Year 2038 problem?

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.

Why does JavaScript give me a 13-digit number?

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().

Is my data sent anywhere?

No. The converter runs entirely in your browser. Timestamps, dates and batch lists are never uploaded.

What is the difference between ISO 8601 and RFC 2822?

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.

More in Free Tools

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.

Product

Who It's For

Features

Resources

Company

View Sitemap