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…
—
—
—
—
Accepts Unix timestamps (s / ms / µs / ns), ISO 8601, RFC 2822 and common date strings.
Timestamp
Unix timestamp (seconds)
—
Milliseconds
—
Microseconds
—
Nanoseconds
—
Date & time
UTC
—
Local time
—
Selected timezone
—
Relative time
—
ISO 8601
—
RFC 3339
—
RFC 2822
—
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:
| Format | Example | Used by |
|---|---|---|
| Seconds (10 digits) | 1758000000 | C, PHP, Python, Go, most APIs |
| Milliseconds (13 digits) | 1758000000000 | JavaScript, Java, SQLite |
| Microseconds (16 digits) | 1758000000000000 | PostgreSQL logs, tracing systems |
| Nanoseconds (19 digits) | 1758000000000000000 | Go time.Now().UnixNano(), Linux kernel |
| ISO 8601 / RFC 3339 | 2025-09-16T05:20:00Z | APIs, config files, humans |
| RFC 2822 | Tue, 16 Sep 2025 05:20:00 +0000 | Email headers, HTTP |
Unix timestamp examples
| Timestamp | UTC date | Moment |
|---|---|---|
| 0 | 1970-01-01 00:00:00 | The Unix epoch |
| 86400 | 1970-01-02 00:00:00 | One day after the epoch |
| 946684800 | 2000-01-01 00:00:00 | Y2K |
| 1000000000 | 2001-09-09 01:46:40 | One billion seconds |
| 1234567890 | 2009-02-13 23:31:30 | The famous sequential timestamp |
| 2147483647 | 2038-01-19 03:14:07 | 32-bit signed maximum (the 2038 problem) |
| -1 | 1969-12-31 23:59:59 | One 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.
// now
Math.floor(Date.now() / 1000)
// timestamp → date
new Date(timestamp * 1000)// now
const ts: number = Math.floor(Date.now() / 1000);
// timestamp → date
const date: Date = new Date(timestamp * 1000);// now
int(time.time())
// timestamp → date
datetime.fromtimestamp(timestamp, timezone.utc)// now
time();
// timestamp → date
date('c', $timestamp);// now
Instant.now().getEpochSecond();
// timestamp → date
Instant.ofEpochSecond(timestamp);// now
DateTimeOffset.UtcNow.ToUnixTimeSeconds();
// timestamp → date
DateTimeOffset.FromUnixTimeSeconds(timestamp);// now
time.Now().Unix()
// timestamp → date
time.Unix(timestamp, 0).UTC()// now
Time.now.to_i
// timestamp → date
Time.at(timestamp).utc// now
Int(Date().timeIntervalSince1970)
// timestamp → date
Date(timeIntervalSince1970: TimeInterval(timestamp))// now
extract(epoch from now())::bigint;
// timestamp → date
to_timestamp(timestamp);// now
UNIX_TIMESTAMP();
// timestamp → date
FROM_UNIXTIME(timestamp);// 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?
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?
How do I convert a Unix timestamp to a date?
new Date(timestamp * 1000).How do I convert a date to a Unix timestamp?
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?
Is a Unix timestamp UTC?
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?
What is the 2038 problem?
Explore the timestamp workbench
Timestamp to Date
Turn any Unix timestamp into UTC, local time, ISO 8601, RFC 3339 and relative time.
Date to Timestamp
Pick a date, time and IANA timezone to get the exact Unix timestamp in every precision.
Current Unix Time
Live Unix timestamp in seconds, milliseconds, microseconds and nanoseconds with copy buttons.
Epoch Converter
The classic epoch time converter: bidirectional conversion between epoch values and human-readable dates.
Timezone Converter
See one instant across multiple IANA timezones side by side, with add, reorder and copy-all.
Batch Timestamp Converter
Paste a list of timestamps and convert them all at once. Copy as a table or download CSV.