Free live Unix time counter
The Unix timestamp right now
The number above is the current Unix timestamp: the seconds elapsed since 1 January 1970 at 00:00:00 UTC, counting up as you read. Copy it in seconds or milliseconds with one click, freeze it while you transcribe, or take the one-line call that fetches it in your own language from the grid below. Everything here is free and needs no account, the clock comes from your own device rather than a server, and the reference underneath covers what the epoch is, what happens to it in 2038 and why the 27 leap seconds since 1972 are nowhere in the count.
- 100% free
- No signup
- Updates every second
- Seconds and milliseconds
- 10 languages
The Unix time right now
––––––––––
The counter starts the moment this page finishes loading.
The timestamp for some other date
Asking for it in code, in ten runtimes
JavaScript
Math.floor(Date.now() / 1000); // seconds Date.now(); // milliseconds
Date.now() is the odd one out: it counts milliseconds, so the floor division is what everything else calls a timestamp.
Python
import time int(time.time()) # seconds time.time_ns() # nanoseconds
time.time() returns a float, and above 2^53 nanoseconds its last digits are noise — time_ns() exists for that reason.
Go
import "time" time.Now().Unix() // seconds time.Now().UnixMilli() // milliseconds
UnixMilli and UnixMicro arrived in Go 1.17; before that everyone divided UnixNano by hand.
Java
Instant.now().getEpochSecond(); // seconds System.currentTimeMillis(); // milliseconds
Instant.now() is limited to millisecond resolution on most JVMs even though the type holds nanoseconds.
C#
DateTimeOffset.UtcNow.ToUnixTimeSeconds(); DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
DateTime.Now.Ticks counts from year 1, not 1970 — a different number entirely, and a frequent mix-up.
PHP
time(); // seconds (int) round(microtime(true) * 1000); // milliseconds
time() obeys date_default_timezone_set for formatting but not for its value: the integer is always UTC-based.
Ruby
Time.now.to_i # seconds (Time.now.to_f * 1000).to_i # milliseconds
Time.now.to_r keeps the exact rational value when rounding to a float would lose sub-microsecond digits.
Rust
use std::time::{SystemTime, UNIX_EPOCH}; SystemTime::now() .duration_since(UNIX_EPOCH) .unwrap() .as_secs()duration_since returns a Result because a machine whose clock sits before 1970 makes the subtraction negative.
Bash / shell
date +%s # seconds date +%s%3N # milliseconds, GNU coreutils
%N is a GNU extension: on macOS the BSD date prints a literal N unless you install coreutils and call gdate.
SQL
SELECT EXTRACT(EPOCH FROM now())::bigint; -- PostgreSQL SELECT UNIX_TIMESTAMP(); -- MySQL
MySQL's UNIX_TIMESTAMP() reads the session time zone, so two connections can disagree about the same instant.
Milestones the counter has passed, and the ones ahead
Eight values worth recognising on sight. Four of them are ordinary round numbers; the last four are the edges of the integer types the count is stored in, and each one is a date something stops working.
| Value | Instant | Why it is worth knowing |
|---|---|---|
| 0 | 1970-01-01T00:00:00Z | Where the count starts. A field that shows this date is holding a zero, not a date. |
| 1000000000 | 2001-09-09T01:46:40Z | The first billion seconds, and the moment nine-digit assumptions started failing. |
| 1234567890 | 2009-02-13T23:31:30Z | The one engineers threw parties for, and still the most-used value in test fixtures. |
| 1500000000 | 2017-07-14T02:40:00Z | A convenient round marker for anyone eyeballing whether a value is recent. |
| 2000000000 | 2033-05-18T03:33:20Z | Two billion, and the last round milestone before the 32-bit ceiling. |
| 2147483647 | 2038-01-19T03:14:07Z | The largest signed 32-bit integer: one second later the count goes negative. |
| 2147483648 | 1901-12-13T20:45:52Z | What that next second reads as once it has wrapped — the 2038 bug in one line. |
| 4294967295 | 2106-02-07T06:28:15Z | The unsigned 32-bit ceiling, where code that dodged 2038 by treating the field as unsigned runs out. |
The year 2038 problem
A signed 32-bit integer can hold 2,147,483,647 and no more. Because the C type time_t was that integer on almost every Unix system for thirty years, the count runs out at 03:14:07 UTC on 19 January 2038, and the next tick sets the sign bit: the value becomes -2,147,483,648 and the date becomes 13 December 1901. Nothing crashes loudly. Certificates validate against a date in the past, schedulers fire immediately or never, and anything sorting by timestamp puts the newest records first.
Sixty-four-bit systems solved this by widening time_t, which moves the ceiling out by roughly 292 billion years, and mainstream Linux finished the 32-bit conversion work in kernel 5.6 in 2020. What remains is narrower and worth auditing directly: a MySQL TIMESTAMP column tops out on exactly that 2038 date while a DATETIME column does not, ext4 needs 256-byte inodes to store dates past 2038, and embedded firmware, industrial controllers and network appliances routinely keep 32-bit builds in service for decades. The bug is already live wherever software reasons about the future: a 20-year term calculated today crosses the boundary, which is how banks found their copy of it in the 2010s.
Leap seconds, and why this number ignores them
The earth does not rotate on a schedule. UTC keeps civil time within 0.9 seconds of the planet by inserting a leap second when the two drift apart, which has happened 27 times since 1972 — most recently at the end of 31 December 2016. Add the ten seconds UTC started out behind atomic time and TAI now runs 37 seconds ahead of the clock on your wall.
Unix time skips all of it by definition. POSIX specifies the count as days since the epoch multiplied by 86,400 plus the seconds elapsed in the current day, and a formula shaped like that has no room to express a 61-second minute. During an insertion the count therefore repeats a value or freezes for a second, depending on the kernel, and subtracting two timestamps that straddle a leap second gives an answer one second short of the physical truth. Google and Amazon avoid the discontinuity entirely by smearing the extra second across a whole day of slightly slow clocks, which keeps monotonicity at the cost of every machine being up to half a second from real UTC while the smear runs.
None of this will matter for much longer. In November 2022 the General Conference on Weights and Measures resolved to stop inserting leap seconds by 2035 and to let the gap between UTC and the earth widen instead, which finally makes the assumption everyone has already coded into their software true.
How to get the current Unix timestamp
Copy it, pin it while you type it out, or take the call that produces it in your own language.
Take the number at the top
The large figure is the count of seconds elapsed right now, refreshed once a second from your own device clock. Copy seconds puts the ten-digit form on the clipboard and Copy milliseconds puts the thirteen-digit form there instead — three zeros separate them, and handing over the wrong one is the single most common cause of a date landing in January 1970.
Hold it still if you are transcribing
Press Hold it still and the counter stops on the second you pressed it, so a value you are typing into a fixture, a test assertion or a support ticket cannot change underneath you. The row beneath keeps showing that frozen instant as ISO 8601 in UTC and as a sentence in your own zone. Press it again and the count resumes from the true clock rather than from where it paused.
Or ask for it in code instead
The grid at the bottom gives the exact call for JavaScript, Python, Go, Java, C#, PHP, Ruby, Rust, shell and SQL, each with the trap that runtime is known for — Date.now returning milliseconds, %N being absent from BSD date, MySQL reading the session zone. Copy the snippet rather than the number when the value has to be fresh every time the code runs.
Technical specifications
| Epoch | 1970-01-01T00:00:00Z, the origin POSIX fixes for the count |
|---|---|
| Refresh rate | Once a second from the device clock, pausable, resuming from the true time |
| Forms offered | Seconds (10 digits), milliseconds (13 digits), ISO 8601 in UTC, and the sentence form in your detected zone |
| Countdown targets | The next multiple of one million, ten million and a hundred million seconds, plus 2000000000 on 18 May 2033 |
| Code snippets | Ten runtimes — JavaScript, Python, Go, Java, C#, PHP, Ruby, Rust, shell and SQL — with the seconds and milliseconds call for each |
| Signed 32-bit ceiling | 2147483647, reached at 03:14:07 UTC on 19 January 2038; the unsigned ceiling 4294967295 falls on 7 February 2106 |
| Leap seconds | Not counted: 27 have been inserted into UTC since 1972 and none of them appear in this number |
| Clock source | Your own device — the page makes no network call to ask a time server, and there is no signup or limit on how often you copy the value |
Frequently asked questions
What is a Unix timestamp?
It is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC, ignoring leap seconds. That single integer identifies a moment for every computer on earth without a calendar, a locale or a time zone attached, which is why it is what operating systems, databases and protocols pass around internally. The name comes from Unix, where the count began, but POSIX, Java, Go, Rust and every SQL engine use the same origin.
Does Unix time count leap seconds?
No, and that is written into the definition rather than being an oversight. POSIX fixes a day at exactly 86,400 seconds, so Unix time is computed as days since the epoch times 86,400 plus the seconds of the day; the 27 leap seconds UTC has inserted since 1972 have no slot in that formula. During an actual leap second the count either repeats a value or stalls, depending on the operating system, and the practical consequence is that the difference between two Unix timestamps is not the true elapsed physical time — it is short by however many leap seconds fell between them. Atomic time, TAI, is currently 37 seconds ahead of UTC for this reason.
What breaks in 2038?
Anything still storing the count in a signed 32-bit integer, which overflows at 2147483647 — 03:14:07 UTC on 19 January 2038. One second later the value wraps to negative and the date reads 13 December 1901. Modern 64-bit systems were fixed years ago and will not run out for another 292 billion years, but the exposure that remains is specific and findable: MySQL TIMESTAMP columns, embedded firmware, filesystems with 32-bit inode timestamps, and any protocol that pins the field width. It is already a live bug rather than a future one, because a 20-year certificate or mortgage issued today ends after the rollover.
Is the Unix timestamp the same everywhere in the world?
Yes — the number on this page is identical to the one a machine in Tokyo or São Paulo would print at this instant. A timestamp has no time zone; zones only appear when the count is rendered as a calendar date, and that is a display decision made afterwards. This is exactly why systems that span regions exchange the integer and format it at the very last step, and why two servers showing different values are showing a clock problem rather than a zone problem.
Why does Date.now() give me thirteen digits when everything else gives ten?
Because JavaScript counts milliseconds and almost nothing else does. Date.now, the Date constructor and every timestamp inside the browser are millisecond-based, so passing one straight into an API that expects POSIX seconds produces a date roughly 50,000 years out, and doing the reverse produces 1970. Math.floor(Date.now() / 1000) is the conversion, and both forms are on the clipboard buttons above so you can take whichever the other side wants.
Why does my server report a different timestamp than this page?
Because this page reads the clock on the device you are sitting at, and that clock drifts. Consumer hardware loses or gains seconds a day without NTP, virtual machines skew after a snapshot restore, and a laptop resuming from sleep can be minutes out until it resynchronises. A few seconds of difference is normal and is the reason token validators allow clock skew — 60 seconds is the customary tolerance. Minutes of difference is a machine that is not talking to a time server.
Is Unix time UTC or GMT?
The epoch is defined against UTC, though for this purpose GMT and UTC name the same instant. The distinction matters elsewhere: GMT is a time zone that the United Kingdom leaves every summer, while UTC is a time standard that never shifts. Saying a timestamp is in UTC is really shorthand for saying it has no zone at all — it is a count, and UTC is simply the zone in which that count reads as a round midnight on 1 January 1970.
About Unix time
The counter began as a compromise about hardware. The first edition of Unix in 1971 recorded time in sixtieths of a second, matching the mains frequency the PDP-11 clock ticked at, and a 32-bit field filled with sixtieths lasts a little over two years — so the epoch had to be re-based every couple of years. Moving to whole seconds in 1972 and fixing the origin at the start of 1970 made the field last until 2038 instead, which everyone involved regarded as comfortably beyond the horizon. Nothing about the choice was astronomical; it was the nearest round date behind a machine that needed a bigger range.
What made the format win was that it refuses to hold ambiguity. A calendar string can be written a dozen ways, means different instants in different zones and needs a parser with opinions; an integer sorts, subtracts and compares with no context at all. That is also its weakness, and the source of nearly every bug people bring to a page like this one — the integer does not record its own unit, so seconds and milliseconds are indistinguishable without a rule of thumb, and it does not record the zone anything was meant to be displayed in. Take one apart digit by digit on the epoch conversion workbench when you need the unit named and the zone shown alongside UTC.
Unix time is also not the only epoch in circulation, merely the one that won. Windows counts 100-nanosecond intervals from 1601, .NET from the year 1, Apple from 2001, GPS from 6 January 1980 and without any leap-second corrections at all, and Excel counts days from 1899 with a deliberate off-by-one to stay bug-compatible with Lotus 1-2-3. A number that refuses to make sense as Unix seconds is usually one of those, and the format translator exists to work out which one before converting it.
Where the clock is read
The timestamp on this page comes from your own machine. No request is made to a time server, nothing you copy is recorded, and the date you type into the second panel stays in the tab — which also means the counter keeps running with the network switched off, and that its accuracy is exactly the accuracy of your device clock.