Unix timestamp converter
The current Unix timestamp is:
Sun, 18 Oct 2026 05:41:30 GMT
- Detected as
- –
- Your local time
- –
- UTC (GMT)
- –
- ISO 8601
- –
- Relative
- –
- Unix seconds
- –
- Unix milliseconds
- –
- Day of year / ISO week
- –
Shown in your time zone: UTC. Change it:
Date and time to timestamp
Timestamp: –
What is a Unix timestamp?
A Unix timestamp is simply a count of seconds since midnight UTC on 1 January 1970, a moment programmers call “the epoch”. Right now it is a 10-digit number that goes up by one every second. Because it is a single number with no time zone attached, it is the easiest way for computers, databases and APIs to store and compare moments in time, and it is identical everywhere on Earth at the same instant.
Many systems count in milliseconds instead (13 digits), including JavaScript’s Date.now() and Java’s System.currentTimeMillis(). Some logging and tracing tools use microseconds (16 digits) or nanoseconds (19 digits). Paste any of them above and the unit is detected from the length.
How to get the current timestamp in code
| JavaScript | Math.floor(Date.now() / 1000) |
| Python | import time; int(time.time()) |
| PHP | time() |
| Bash (Linux/macOS) | date +%s |
| PowerShell | [DateTimeOffset]::UtcNow.ToUnixTimeSeconds() |
| Java | Instant.now().getEpochSecond() |
| C# | DateTimeOffset.UtcNow.ToUnixTimeSeconds() |
| Go | time.Now().Unix() |
| MySQL | SELECT UNIX_TIMESTAMP(); |
| PostgreSQL | SELECT EXTRACT(EPOCH FROM now()); |
How to turn a timestamp back into a date
| JavaScript | new Date(1760000000 * 1000).toISOString() |
| Python | datetime.fromtimestamp(1760000000, tz=timezone.utc) |
| Bash (GNU/Linux) | date -d @1760000000 |
| Bash (macOS) | date -r 1760000000 |
| MySQL | SELECT FROM_UNIXTIME(1760000000); |
| PostgreSQL | SELECT to_timestamp(1760000000); |
Things that trip people up
- Seconds vs milliseconds. A date in January 1970 usually means milliseconds were read as seconds the other way round; a date tens of thousands of years away means seconds were treated as milliseconds.
- Time zones. The timestamp is always UTC. If a converted time looks a few hours off, the display is in a different zone from the one you expected.
- Leap seconds. Unix time pretends every day has exactly 86,400 seconds, so leap seconds are not counted. For everyday use this makes no difference.
- The year 2038. Signed 32-bit timestamps run out at 2,147,483,647 (19 January 2038, 03:14:07 UTC). The result above tells you whether a value still fits in 32 bits.
For developers and AI agents: GET /api/timestamp?value=1760000000&tz=Africa/Johannesburg returns the same data as JSON, and the MCP server has get_current_time and convert_timestamp tools. Counting days instead? Try the days between dates calculator.
Frequently asked questions
What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have passed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It is the same number everywhere in the world at the same moment, which is why computers use it to store dates.
How do I know if a timestamp is in seconds or milliseconds?
Count the digits. A present-day timestamp in seconds has 10 digits (for example 1760000000), in milliseconds it has 13, in microseconds 16 and in nanoseconds 19. This converter detects the unit automatically and tells you which one it used.
Does a Unix timestamp depend on my time zone?
No. The timestamp itself is always counted from UTC, so it is identical in London, Johannesburg and Tokyo. Only the way it is displayed changes: the converter shows both UTC and your own local time.
What is the Year 2038 problem?
Older systems store the timestamp as a signed 32-bit number, whose largest value is 2,147,483,647. That moment is 03:14:07 UTC on 19 January 2038. One second later such systems overflow to a date in 1901. Modern systems use 64-bit numbers and are not affected.
How do I get the current timestamp in Excel or Google Sheets?
To turn a timestamp in cell A1 into a date, use =(A1/86400)+DATE(1970,1,1) and format the cell as a date and time. The result is in UTC; add or subtract hours/24 for your time zone.