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.
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:
| Unit | Digits today | Example (14 Nov 2023 22:13:20 UTC) |
|---|---|---|
| Seconds | 10 | 1700000000 |
| Milliseconds | 13 | 1700000000000 |
| Microseconds | 16 | 1700000000000000 |
| Nanoseconds | 19 | 1700000000000000000 |
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
Step 2: Convert to seconds
Step 3: Add to the epoch
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
| Timestamp | UTC date | Why it matters |
|---|---|---|
| 0 | 1970-01-01 00:00:00 UTC | The Unix epoch |
| 1000000000 | 2001-09-09 01:46:40 UTC | One billion seconds |
| 1234567890 | 2009-02-13 23:31:30 UTC | Celebrated by developers worldwide |
| 1700000000 | 2023-11-14 22:13:20 UTC | 1.7 billion |
| 2000000000 | 2033-05-18 03:33:20 UTC | Two billion seconds |
| 2147483647 | 2038-01-19 03:14:07 UTC | Largest 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.
| Language | Code |
|---|---|
| JavaScript | Math.floor(Date.now() / 1000) |
| Python | int(time.time()) |
| Bash (Linux, macOS) | date +%s |
| PostgreSQL | EXTRACT(EPOCH FROM now()) |
| MySQL | UNIX_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.
Related Tools
Switch between 24-hour time and 12-hour AM/PM.
Express a duration in minutes as decimal hours.
Convert durations between seconds, minutes, hours, and more.
Find the corresponding time in another time zone.
Convert years to decades.
Capitalize the first letter of every word.