Skip to main content
Screendesk
Free tool

Unix Timestamp Converter

Convert epoch timestamps to readable dates and dates back to timestamps. Seconds or milliseconds, ISO 8601, UTC, and any time zone.

Open source on GitHub

Current Unix timestamp

—

—

Timestamp to date

Auto-detects seconds (10 digits), milliseconds (13), microseconds (16) and nanoseconds (19).

Paste a timestamp from a log line, API response, or database row.

Date to timestamp

ISO 8601, RFC 2822, or HTTP dates. Values without an offset are read in the selected time zone.

Runs entirely in your browser using your device’s clock. Nothing is uploaded.

Units

Seconds, milliseconds, and beyond. Read the unit from the number of digits.

Unix timestamp units by digit count
UnitDigitsExampleCommonly used by
Seconds101760000000Unix time, JWT exp/iat, most server logs, PostgreSQL epoch
Milliseconds131760000000000JavaScript Date.now(), Java currentTimeMillis, many JSON APIs
Microseconds161760000000000000Python time_ns() / 1000, PostgreSQL internal timestamps, tracing spans
Nanoseconds191760000000000000000Go UnixNano, OpenTelemetry, Prometheus exports
Code

Get the current timestamp in your language. And turn a timestamp back into a date.

Current Unix timestamp and conversion by programming language
LanguageSecondsMillisecondsTimestamp to date
JavaScriptMath.floor(Date.now() / 1000)Date.now()new Date(ts * 1000)
Pythonint(time.time())time.time_ns() // 1_000_000datetime.fromtimestamp(ts, tz=timezone.utc)
Gotime.Now().Unix()time.Now().UnixMilli()time.Unix(ts, 0).UTC()
JavaInstant.now().getEpochSecond()System.currentTimeMillis()Instant.ofEpochSecond(ts)
PHPtime()(int) (microtime(true) * 1000)date('c', $ts)
RubyTime.now.to_iProcess.clock_gettime(Process::CLOCK_REALTIME, :millisecond)Time.at(ts).utc
PostgreSQLextract(epoch from now())::bigint(extract(epoch from now()) * 1000)::bigintto_timestamp(ts)
MySQLUNIX_TIMESTAMP()ROUND(UNIX_TIMESTAMP(NOW(3)) * 1000)FROM_UNIXTIME(ts)
Bash (GNU date)date +%sdate +%s%3Ndate -u -d @ts
FAQ

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 elapsed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. Because it is a single number with no time zone, it is the most common way to store and exchange points in time in logs, databases, and APIs.

How do I tell if a timestamp is in seconds or milliseconds?

Count the digits. A current timestamp in seconds has 10 digits (for example 1760000000), while milliseconds have 13, microseconds 16, and nanoseconds 19. This converter auto-detects the unit from the digit count, and you can override it if your value is unusual, such as a date before 2001 in seconds.

Does a Unix timestamp depend on the time zone?

No. A Unix timestamp always counts from midnight UTC, so the same instant has the same timestamp everywhere. Time zones only matter when you display it as a calendar date and time. Pick a time zone above to see how the same timestamp reads in a given location.

What is the Year 2038 problem?

Systems that store Unix time as a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038 (timestamp 2147483647) and wrap around to 1901. Modern operating systems, languages, and databases use 64-bit timestamps, but older embedded devices, file formats, and database columns can still be affected.

Why does my converted date look a few hours off?

Usually the timestamp is being displayed in a different time zone than you expect, or a local date string was parsed as UTC (or the other way round). Compare the UTC and local rows above. If the difference is exactly 1,000 times too large or small, the value was read in the wrong unit, seconds versus milliseconds.

Customer support runs on Screendesk.

Start for free