Skip to content

Unix Timestamp Converter

Paste a Unix timestamp, also called epoch time, to see its date in UTC and your time zone, or pick a date to get its timestamp. Seconds, milliseconds, microseconds and 19-digit nanosecond timestamps are detected for you.

A timestamp as a date

Before

Timestamp: 1609459200

Seconds since 1970

After

2021-01-01T00:00:00.000Z Fri, 01 Jan 2021 00:00:00 GMT

The same moment as a date, in UTC

Current Unix time (seconds)

-

Timestamp to date

Unit

Paste a timestamp in seconds, milliseconds, microseconds or nanoseconds. The unit is worked out from the number of digits.

Date to timestamp

Read the date as

Pick a date and time to get its Unix timestamp.

Convert a list

Timestamps become ISO dates in UTC. Dates become Unix seconds. Copy all gives tab-separated columns that paste into a spreadsheet. Up to 1000 lines.

Start and end of today, this month and this year

Example for 2026-11-13 in UTC. The table switches to today's values once the page loads.

Period (UTC)Starts atEnds at
Day17945280001794614399
Month17934912001796083199
Year17672256001798761599

Seconds, milliseconds or nanoseconds: count the digits

A timestamp today has 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. Count the digits of yours to find its unit; the converter does the same. Each row is the same moment.

UnitDigitsExample
seconds101700000000
milliseconds131700000000000
microseconds161700000000000000
nanoseconds191700000000000000000

Embed this tool

Paste this into your page's HTML. It adds the converter in a frame, with a link back to this page under it.

How to convert a Unix timestamp

  1. Paste a timestamp into Timestamp to date. It shows the date in your time zone, in UTC and in ISO 8601 format, plus how long ago or how far ahead it is.
  2. To go the other way, pick a date and time in Date to timestamp and choose whether it is UTC or your own time zone.
  3. For log files and spreadsheets, paste a whole column into Convert a list and copy the results back out. To read the exp and iat times inside a token, paste it into JWT Decoder.

Frequently asked questions

What is a Unix timestamp?

The number of seconds since 1 January 1970 at midnight UTC, not counting leap seconds. It is the same everywhere in the world at the same moment, which is why servers, databases and APIs store time this way.

Is epoch time the same as Unix time?

Yes. Epoch time, Unix time, POSIX time and a Unix timestamp all count the seconds since the Unix epoch, 1 January 1970 at 00:00:00 UTC. Paste any of them into the converter above.

How do I convert a Unix timestamp to a datetime?

Paste the number into Timestamp to date. It shows the datetime in your time zone and in UTC. 1700000000 is 14 November 2023 at 22:13:20 UTC. To go the other way, from a datetime to Unix time, use Date to timestamp.

How do I convert a date to a Unix timestamp?

Pick the date and time in Date to timestamp and choose UTC or your own time zone. 14 November 2023 at 22:13:20 UTC gives 1700000000. The time zone matters: the same wall-clock time in New York gives a different number.

How do I convert a Unix timestamp to a date on Linux or a Mac?

On Linux, run date -d @1700000000, and add -u to see it in UTC: Tue 14 Nov 22:13:20 UTC 2023. On a Mac, run date -r 1700000000. To print the current Unix time on either, run date +%s.

How do I convert a Unix timestamp to a date in Excel or Google Sheets?

Put the timestamp in A1, use =A1/86400+DATE(1970,1,1), then format the cell as a date and time. For milliseconds, divide by 86400000 instead. The result is in UTC; to move it to your time zone, add your offset in hours divided by 24, such as -5/24 for New York in winter.

Why does my date show 1970 or the year 55,000?

The unit is wrong. A 13-digit number is milliseconds; read as seconds it lands tens of thousands of years in the future. A 10-digit number read as milliseconds lands in January 1970. Leave Unit on Auto and the tool picks the unit from the number of digits. The table above lists the digits for each unit.

How do I convert a nanosecond timestamp?

Paste all 19 digits into the converter and leave Unit on Auto; a 19-digit number is read as nanoseconds. For example, 1700000000123456789 reads as 14 November 2023, 22:13:20.123 UTC. The date shows to the millisecond, because a JavaScript date cannot hold more; the Nanoseconds row keeps all 19 digits. By hand, divide by 1,000,000,000 to get Unix seconds.

How do I convert milliseconds to a date?

Paste the 13-digit number into the converter and leave Unit on Auto; 13 digits are read as milliseconds. For example, 1700000000000 reads as 14 November 2023, 22:13:20 UTC. By hand, divide by 1,000 to get seconds, or in JavaScript run new Date(1700000000000).

Seconds or milliseconds: which does my language use?

JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds. Unix shells (date +%s), PHP's time(), Python's time.time() and most databases use seconds. Go offers both seconds and nanoseconds, and many logging systems use nanoseconds.

How do I get the current Unix time in code?

JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()) after import time. Go: time.Now().Unix(). PostgreSQL: extract(epoch from now())::bigint. MySQL: UNIX_TIMESTAMP(). Each gives seconds; paste the number above to read it as a date.

What is ISO 8601?

The international standard for writing dates and times, largest unit first: year, month, day, hour, minute, second, as in 2023-11-14T22:13:20Z. The T separates the date from the time and Z means UTC. An offset such as +05:00 can replace the Z. That example is the Unix timestamp 1700000000. To convert one, paste it into Convert a list.

What happens on 19 January 2038, the year 2038 problem?

Old systems store seconds in a signed 32-bit integer. Its largest value, 2147483647, is 03:14:07 UTC on 19 January 2038. One second later it wraps to -2147483648, which reads as 20:45:52 UTC on 13 December 1901. Paste either number to see it. Modern systems use 64 bits and are not affected.

Does it work for dates before 1970?

Yes. A date before 1 January 1970 is a negative number of seconds. For example, -86400 is 00:00:00 UTC on 31 December 1969, one day before the epoch. Type a negative number, or pick a date such as 15 June 1960 in the date field, and the converter shows the other side.

Does the converter send my data anywhere?

No. Every conversion happens in your browser as you type.