Skip to content

Unix Time Converter

Convert a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds to a UTC and local date, or turn a date and time into a timestamp.

Current Unix timestamp

1792577819

Wed, 21 Oct 2026 10:16:59 GMT

What Unix Time Counts

Unix time is the number of seconds since 00:00:00 UTC on 1 January 1970, the "Unix epoch". It identifies an instant rather than a clock reading, so the same timestamp is the same moment everywhere in the world. Negative values are instants before 1970: −1 is 23:59:59 UTC on 31 December 1969.

Unix time ignores leap seconds. Every day is counted as exactly 86,400 seconds, which keeps date arithmetic simple. Around a leap second, the count briefly repeats or pauses, depending on the system.

You'll usually meet a timestamp in one of four places: a database record (columns like created_at or last_login), a server or application log, an API response (JSON fields such as "created": 1700000000), or a monitoring and debugging tool. Because the count is the same on every machine, events from different servers and time zones line up on one timeline. Converting the number to a date and time is how you read it.

date = 1970-01-01 00:00:00 UTC + timestamp seconds
days since 1970 = timestamp ÷ 86,400

Seconds, Milliseconds, Microseconds or Nanoseconds?

Systems store the same instant at different resolutions. JavaScript and Java use milliseconds, most Unix tools use seconds, and databases and tracing systems often use micro- or nanoseconds. For present-day dates, the digit count gives the unit away, which is how "Detect automatically" works:

The same instant written in four timestamp units
UnitDigits todayExample (14 Nov 2023 22:13:20 UTC)
Seconds101700000000
Milliseconds131700000000000
Microseconds161700000000000000
Nanoseconds191700000000000000000

Detection treats values below 10¹¹ as seconds, then steps up a unit for each extra factor of 1,000. It works for any date from 1973 to the year 5000. For very old millisecond values or anything unusual, pick the unit yourself. Nanosecond values are read to the nearest microsecond or so, because browsers can't hold 19-digit integers exactly.

Worked Example: Reading a Log Timestamp

A server log line starts with 1700000000123. When did the event happen?

Step 1: Identify the unit

13 digits → milliseconds

Step 2: Convert to seconds

1700000000123 ÷ 1000 = 1700000000.123 s

Step 3: Add to the epoch

2023-11-14T22:13:20.123Z

The event happened at 22:13:20.123 UTC on 14 November 2023. If it had been read as seconds, the date would land more than 50,000 years in the future, a sure sign of a unit mismatch.

Notable Unix Timestamps

Notable Unix timestamps and their UTC dates
TimestampUTC dateWhy it matters
01970-01-01 00:00:00 UTCThe Unix epoch
10000000002001-09-09 01:46:40 UTCOne billion seconds
12345678902009-02-13 23:31:30 UTCCelebrated by developers worldwide
17000000002023-11-14 22:13:20 UTC1.7 billion
20000000002033-05-18 03:33:20 UTCTwo billion seconds
21474836472038-01-19 03:14:07 UTCLargest signed 32-bit value: the Year 2038 problem

Time Zones and Date → Unix

A timestamp has no time zone, but a clock reading does. In Date → Unix mode, choose whether the date and time you enter are in your device's local zone or in UTC. Entering 09:00 "local" in London and in New York gives timestamps five hours apart. Entering 09:00 "UTC" gives the same timestamp everywhere.

Local times near a daylight-saving change can be skipped or happen twice, and a plain date field can't say which of a repeated hour you mean. Use UTC when you need an unambiguous record.

Getting the Current Timestamp in Code

Each snippet returns whole seconds, except the spreadsheet formula, which turns a seconds value in cell A2 into a date. Format that cell as a date and time.

Code to get or convert a Unix timestamp in common languages
LanguageCode
JavaScriptMath.floor(Date.now() / 1000)
Pythonint(time.time())
Bash (Linux, macOS)date +%s
PostgreSQLEXTRACT(EPOCH FROM now())
MySQLUNIX_TIMESTAMP()
Excel / Sheets (seconds → date)=A2/86400 + DATE(1970,1,1)

The Year 2038 Problem

Older systems store Unix time in a signed 32-bit integer, which can't go past 2,147,483,647. That limit falls at 03:14:07 UTC on 19 January 2038. One second later the counter overflows to a large negative number, and those systems read the date as December 1901. Modern operating systems and languages use 64-bit time, which pushes the limit billions of years away, but embedded devices and old file formats may still be affected.

Frequently asked questions

Is Unix time the same as UTC?

Not quite. Unix time is a count of seconds from 1970 measured on the UTC timescale, but it skips leap seconds, so it can differ from a true count of elapsed SI seconds by the number of leap seconds since 1972.

Why do I get a date in the year 55,000?

You probably entered a millisecond timestamp as seconds. Set the unit to milliseconds, or leave it on automatic detection.

Can a Unix timestamp be negative?

Yes. Negative timestamps are instants before 1 January 1970. For example, −86400 is 31 December 1969 at 00:00 UTC.

What is epoch time?

Another name for Unix time. "Epoch" refers to the starting instant, 1 January 1970 00:00:00 UTC.