X Xerobit

Epoch Converter — Unix Timestamp to Date and Time

Convert Unix epoch timestamps, milliseconds, microseconds, and ISO 8601 dates. Auto-detects the unit from digit count. Shows UTC, local time, day-of-year, and ISO week.

Relative to now
Enter a timestamp or click Now.

How to use the timestamp converter

  1. Paste any number or date. The unit auto-detects from digit count: 10 digits = seconds, 13 = milliseconds, 16 = microseconds.
  2. For ambiguous cases, pick an explicit unit from the dropdown.
  3. Click Now to load the current time.
  4. Copy any format (six shown: Unix s, Unix ms, ISO UTC, local, RFC 1123 UTC, day-of-year).

What is a Unix timestamp?

A Unix timestamp is the number of seconds since 1970-01-01 00:00:00 UTC (the "epoch"). It's timezone-neutral — the same number refers to the same instant anywhere on Earth. This is why every backend, log line, and API uses epoch time internally.

The Unix epoch date of January 1, 1970 was chosen by early Unix developers at Bell Labs as a convenient, recent reference point. Before epoch time became universal, operating systems stored time in dozens of incompatible formats — some as day counts, some relative to 1900, some relative to the system boot. Unix timestamps solved that by giving every system a single, unambiguous integer. Today, epoch time is the de-facto standard across Linux, macOS, Windows (which converts internally), cloud APIs, databases, and nearly every programming language runtime. When you see a number like 1700000000 in a log file, a database row, or a JWT token's iat claim, that is a Unix timestamp.

Current Unix timestamp

The tool displays the live epoch time, updating every second. Unix time is defined as the total seconds elapsed since the Unix epoch: Unix time = seconds since 1970-01-01 00:00:00 UTC. The counter never resets and never accounts for leap seconds — it is a pure, monotonically increasing integer.

Seconds vs milliseconds vs microseconds

Which unit you get depends on who made the timestamp:

Milliseconds vs seconds

Most Unix timestamps are seconds and have 10 digits. JavaScript's Date.now() returns milliseconds and has 13 digits — it is 1,000 times larger. Divide a JavaScript timestamp by 1,000 to get standard Unix seconds. The classic symptom of mixing them up: your date shows 1970, or a year in the distant future (the year 2554 is a common tell for accidental millisecond-as-seconds errors).

Epoch to date conversion examples

The table below shows representative Unix timestamps converted to their UTC date and time. Use these as a quick sanity-check when debugging epoch values in logs or APIs.

Unix timestamp Date & Time (UTC) Notes
0 1970-01-01 00:00:00 The Unix epoch origin
1000000000 2001-09-09 01:46:40 One billion seconds milestone
1700000000 2023-11-14 22:13:20 Recent past
1748736000 2025-06-01 00:00:00 Near future
2147483647 2038-01-19 03:14:07 Year 2038 problem limit

Unix timestamp in your code

Getting the current epoch or converting a timestamp varies slightly by language. These are the one-liners you'll actually use in production code.

// JavaScript — current Unix timestamp (seconds)
Math.floor(Date.now() / 1000)
// Current timestamp (milliseconds)
Date.now()
// Timestamp to date
new Date(1700000000 * 1000).toISOString()
import time, datetime
int(time.time())  # Python — current seconds
datetime.datetime.fromtimestamp(1700000000, tz=datetime.timezone.utc)
-- PostgreSQL
SELECT to_timestamp(1700000000);
-- MySQL
SELECT FROM_UNIXTIME(1700000000);

When working with APIs that return timestamps inside JSON payloads, the JSON formatter can help you inspect and pretty-print the response before parsing timestamps from it.

The Year 2038 problem

Unix timestamps stored as signed 32-bit integers overflow at 2038-01-19 03:14:07 UTC — this is the maximum value of a 32-bit signed integer (2,147,483,647 seconds past the epoch). Any system still using 32-bit time_t after that date will roll over to negative values, which most systems interpret as 1901. The practical impact: scheduled jobs, SSL certificate expiry calculations, and file system timestamps could silently break. Most mainstream Linux distributions, macOS, and 64-bit Windows moved to 64-bit time storage years ago. However, some 32-bit embedded systems, industrial controllers, network appliances, and legacy POSIX applications have not been updated. If you work with embedded or IoT systems, verify that your toolchain uses a 64-bit time type. This epoch converter correctly handles all 64-bit Unix timestamp values, well past the year 2038.

Common FAQ

What is the current Unix timestamp?

The current Unix timestamp is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC (the Unix epoch). It increments by one every second and never resets. As of mid-2025 it is approximately 1,748,000,000. Use the Now button in the tool above to see the precise live value.

Why do some timestamps have 13 digits?

Thirteen-digit timestamps are milliseconds — they are 1,000 times the equivalent Unix seconds value. JavaScript's Date.now() always returns milliseconds, which is why most frontend-generated timestamps have 13 digits. Most server-side databases and REST APIs use 10-digit second-precision values. To convert, divide by 1,000 (milliseconds → seconds) or multiply by 1,000 (seconds → milliseconds).

What is epoch to date conversion?

Epoch to date conversion means taking a raw Unix timestamp integer and converting it to a human-readable date and time string in a specific timezone. For example, the timestamp 1700000000 converts to 2023-11-14 22:13:20 UTC. The conversion formula is: divide by 1,000 if milliseconds, then compute the calendar date from the total elapsed seconds since 1970-01-01. This epoch converter performs that calculation instantly in your browser without sending data to a server.

My timestamp shows 1970 — what happened?

You sent milliseconds to a system expecting seconds (or vice versa). Check the digit count and adjust by 1000.

How do I get the current epoch in different languages?

JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). Bash: date +%s. PHP: time(). Go: time.Now().Unix(). Rust: SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs().

Does this tool handle timezones?

Epoch is timezone-neutral; local time uses your browser's timezone. For arbitrary timezone conversion, paste an ISO string with an offset like 2026-04-25T10:00:00+05:00.

Further reading

Related tools

Related articles

Pillar

Part of Dev Productivity — regex, cron, timestamps, HTTP, color, word counter, aspect ratio, case.


Written by Mian Ali Khalid. Last updated 2026-05-12.