TimestampUnix

seconds · milliseconds · microseconds · nanoseconds

Unix Timestamp Converter

Convert Unix timestamps to readable dates and dates back to timestamps. Automatic unit detection, UTC and IANA timezone conversion, ISO 8601, RFC 3339, RFC 2822 and relative time — all computed locally in your browser.

Current Unix time

Live — loading…

Seconds

—

Milliseconds

—

Microseconds

—

Nanoseconds

—

Interpret input as

Accepts Unix timestamps (s / ms / µs / ns), ISO 8601, RFC 2822 and common date strings.

Common Unix timestamp formats

The same instant can be written at different precisions or in textual date formats. The converter above accepts every one of these:

FormatExampleUsed by
Seconds (10 digits)1758000000C, PHP, Python, Go, most APIs
Milliseconds (13 digits)1758000000000JavaScript, Java, SQLite
Microseconds (16 digits)1758000000000000PostgreSQL logs, tracing systems
Nanoseconds (19 digits)1758000000000000000Go time.Now().UnixNano(), Linux kernel
ISO 8601 / RFC 33392025-09-16T05:20:00ZAPIs, config files, humans
RFC 2822Tue, 16 Sep 2025 05:20:00 +0000Email headers, HTTP

Unix timestamp examples

TimestampUTC dateMoment
01970-01-01 00:00:00The Unix epoch
864001970-01-02 00:00:00One day after the epoch
9466848002000-01-01 00:00:00Y2K
10000000002001-09-09 01:46:40One billion seconds
12345678902009-02-13 23:31:30The famous sequential timestamp
21474836472038-01-19 03:14:0732-bit signed maximum (the 2038 problem)
-11969-12-31 23:59:59One second before the epoch

Unix timestamp in programming languages

Get the current timestamp and convert a timestamp back to a date — one line per language. Most languages use seconds; JavaScript, Java and SQLite use milliseconds in their core APIs.

JavaScript
// now
Math.floor(Date.now() / 1000)

// timestamp → date
new Date(timestamp * 1000)
TypeScript
// now
const ts: number = Math.floor(Date.now() / 1000);

// timestamp → date
const date: Date = new Date(timestamp * 1000);
Python
// now
int(time.time())

// timestamp → date
datetime.fromtimestamp(timestamp, timezone.utc)
PHP
// now
time();

// timestamp → date
date('c', $timestamp);
Java
// now
Instant.now().getEpochSecond();

// timestamp → date
Instant.ofEpochSecond(timestamp);
C#
// now
DateTimeOffset.UtcNow.ToUnixTimeSeconds();

// timestamp → date
DateTimeOffset.FromUnixTimeSeconds(timestamp);
Go
// now
time.Now().Unix()

// timestamp → date
time.Unix(timestamp, 0).UTC()
Ruby
// now
Time.now.to_i

// timestamp → date
Time.at(timestamp).utc
Swift
// now
Int(Date().timeIntervalSince1970)

// timestamp → date
Date(timeIntervalSince1970: TimeInterval(timestamp))
PostgreSQL
// now
extract(epoch from now())::bigint;

// timestamp → date
to_timestamp(timestamp);
MySQL
// now
UNIX_TIMESTAMP();

// timestamp → date
FROM_UNIXTIME(timestamp);
SQLite
// now
strftime('%s', 'now');

// timestamp → date
datetime(timestamp, "unixepoch");

What is Unix time?

Unix time (also called epoch time or POSIX time) is a way of representing instants as a single number: the count of seconds elapsed since 00:00:00 UTC on January 1, 1970, excluding leap seconds. It was popularized by Unix systems in the 1970s and is now the lingua franca of computers — APIs, databases, log files, file systems and programming language runtimes all exchange time as Unix timestamps.

The appeal is simplicity. A timestamp is one integer, trivial to store, compare, sort and transmit across systems and locales. Unlike a formatted date string, it has no ambiguity: the same number denotes the same instant everywhere on Earth.

The Unix epoch explained

The epoch is the zero point: 0 means exactly 1970-01-01 00:00:00 UTC. Instants before the epoch are negative — -86400 is 1969-12-31 00:00:00 UTC. Timestamps count real elapsed seconds, so they are independent of calendars, timezones and daylight saving: those concerns only appear when you convert a timestamp into a human-readable local date.

Seconds vs milliseconds

The most common timestamp bug is mixing up units. Seconds are 10 digits today; milliseconds are 13. Multiply seconds by 1,000 to get milliseconds. JavaScript's Date.now() returns milliseconds, while time() in PHP,time.time() in Python and time.Now().Unix() in Go return seconds. Feed a seconds value into a millisecond API and you land in January 1970; feed milliseconds into a seconds API and you land in the year 55,000. The converter above detects the unit from the number of digits and always shows which unit it chose.

Microseconds and nanoseconds

High-resolution timers, databases and tracing systems need finer precision:microseconds (seconds × 1,000,000 — 16 digits) andnanoseconds (seconds × 1,000,000,000 — 19 digits). Go'stime.Now().UnixNano(), PostgreSQL's EXTRACT(EPOCH …) with microsecond resolution and Linux kernel logs all work at these scales. Because JavaScript numbers lose integer precision above 253, this tool computes withBigInt — nanosecond values are converted exactly, never rounded.

The 2038 problem

A signed 32-bit integer can hold at most 2147483647, which corresponds to03:14:07 UTC on January 19, 2038. One second later, a 32-bit counter overflows to negative and time appears to jump back to 1901. This is the "Year 2038 problem" — the Unix-time equivalent of Y2K.

The fix is 64-bit time, and it is essentially complete: every mainstream OS, database and language now stores timestamps in 64 bits, which is enough for about 292 billion years. Embedded devices and legacy file formats with hard-coded 32-bit fields are the remaining stragglers. If your systems are 64-bit clean, 2038 is a non-event.

Frequently asked questions

What is a Unix timestamp?
A Unix timestamp is the number of seconds that have elapsed since the Unix epoch — January 1, 1970 00:00:00 UTC — not counting leap seconds. For example, 1758000000 is the instant 2025-09-16 05:20:00 UTC. Because it counts elapsed time from a fixed instant, the same timestamp means the same moment everywhere on Earth.
What is the current Unix timestamp?
The current Unix timestamp changes every second — the live clock above shows it in seconds, milliseconds, microseconds and nanoseconds. As of 2026 it is a 10-digit number starting with 17.
How do I convert a Unix timestamp to a date?
Paste the timestamp into the converter above. The unit (seconds, milliseconds, microseconds or nanoseconds) is detected automatically, and the result is shown in UTC, your local time, any IANA timezone, ISO 8601, RFC 3339 and RFC 2822 — each with a copy button. In code, JavaScript does it with new Date(timestamp * 1000).
How do I convert a date to a Unix timestamp?
Type any date into the converter — for example 2026-09-19T12:30:00Z or Sat, 19 Sep 2026 12:30:00 GMT — and the timestamp is computed instantly. Dates without an explicit offset are interpreted in the timezone you select. In JavaScript: Math.floor(Date.parse("2026-09-19T12:30:00Z") / 1000).
What is the difference between a Unix timestamp and epoch time?
None in practice — the terms are used interchangeably. "Epoch time", "Unix time" and "POSIX time" all refer to counting time from the Unix epoch of January 1, 1970 00:00:00 UTC.
Is a Unix timestamp UTC?
A Unix timestamp represents an absolute instant, and by definition it counts seconds from the epoch in UTC — it carries no timezone of its own. Timezones only change how that instant is displayed: timestamp 1758000000 is 05:20 in UTC, 01:20 in New York and 14:20 in Tokyo, all at the same moment.
What is a Unix timestamp in milliseconds, microseconds and nanoseconds?
The same instant expressed at higher precision: seconds × 1,000 = milliseconds (13 digits), seconds × 1,000,000 = microseconds (16 digits) and seconds × 1,000,000,000 = nanoseconds (19 digits). JavaScript and Java use milliseconds; C, PHP, Go and Python use seconds; database logs and tracing systems often use microseconds or nanoseconds.
What is the 2038 problem?
Systems that store Unix time in a signed 32-bit integer overflow at 03:14:07 UTC on January 19, 2038 — the largest value they can hold is 2147483647. Modern 64-bit systems are unaffected: a signed 64-bit timestamp covers roughly 292 billion years. Most operating systems and databases migrated to 64-bit time long ago.

Explore the timestamp workbench