Current Unix Timestamp

Epoch time right now, ticking once per second, read from your own device clock.

Current Unix time (seconds)

The current instant in other units and formats
Milliseconds
Microseconds
Nanoseconds
ISO 8601 (UTC)
UTC / GMT
Your local time
RFC 2822
Day of year / ISO week

What this number counts

It is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970, excluding leap seconds. Nothing in it encodes a time zone, a calendar or a locale — those are applied only when the value is rendered. That is precisely why it is the format almost every system uses internally.

Getting the current timestamp in code

LanguageSecondsMilliseconds
JavaScriptMath.floor(Date.now()/1000)Date.now()
Pythonint(time.time())int(time.time()*1000)
PHPtime()(int)(microtime(true)*1000)
Gotime.Now().Unix()time.Now().UnixMilli()
JavaInstant.now().getEpochSecond()System.currentTimeMillis()
RubyTime.now.to_i(Time.now.to_f*1000).to_i
RustSystemTime::now()…as_secs()…as_millis()
Bashdate +%sdate +%s%3N
SQL (Postgres)EXTRACT(EPOCH FROM now())… * 1000

Fuller examples, including parsing and formatting, are on the code pages.

A warning about client clocks

This page reads Date.now() from your browser, which reads your operating system clock. That clock can be wrong — by seconds from ordinary drift, or by hours if the zone or date was set by hand. Never trust a client-supplied timestamp for anything security-relevant such as token expiry, rate limiting or audit logs. Stamp those on the server, and treat any client timestamp as an unverified claim.

Related tools

Frequently asked questions

What is the Unix timestamp right now?

The large number at the top of this page is the current epoch time in seconds, updating every second. The rows beneath it show the same instant in milliseconds, microseconds and nanoseconds, plus ISO 8601 and UTC form.

Is this clock accurate?

It reads your own device clock, so it is exactly as accurate as your machine is. If your system clock has drifted, this page drifts with it. For anything requiring real accuracy, sync against NTP rather than trusting a browser.

How do I get the current timestamp in my code?

In JavaScript, Math.floor(Date.now() / 1000). In Python, int(time.time()). In PHP, time(). In Go, time.Now().Unix(). Full examples for 21 languages are on the code pages.

Why does the timestamp not reset at midnight?

Unix time is a single continuously increasing counter, not a clock that wraps. It has been incrementing once per second since 1970 and has no concept of days, months or time zones — those only appear when the value is formatted for a human.