PureDevTools

Epoch & Unix Timestamp Converter

Convert epoch/Unix timestamps to human dates and vice versa — milliseconds, seconds, batch convert

All processing happens in your browser. No data is sent to any server.

Current Epoch Timestamp

Seconds
1771913992
Milliseconds
1771913992864

What Is an Epoch / Unix Timestamp?

An epoch timestamp (also called a Unix timestamp) is the number of seconds that have elapsed since the Unix epoch — midnight January 1, 1970, 00:00:00 UTC. It is a single integer that represents any specific moment in time, regardless of timezone or locale.

For example:

Epoch ValueRepresents
0January 1, 1970 00:00:00 UTC (Unix epoch origin)
1000000000September 9, 2001 01:46:40 UTC
1705312200January 15, 2024 10:30:00 UTC
2147483647January 19, 2038 03:14:07 UTC (32-bit max)
-86400December 31, 1969 00:00:00 UTC (before epoch)

Because an epoch timestamp is just an integer, it avoids the complexity of timezones and daylight saving time. Two systems anywhere in the world can store the same epoch value and know they refer to exactly the same instant.

Epoch Seconds vs. Epoch Milliseconds

Unix timestamps were originally defined in seconds (10-digit integers for current dates). Many modern programming environments — particularly JavaScript — use milliseconds (13-digit integers) for finer resolution.

FormatDigitsExampleUse Case
Seconds101705312200POSIX/Unix APIs, databases, logs
Milliseconds131705312200000JavaScript Date.now(), browser APIs

This tool auto-detects which unit you’ve entered based on the magnitude of the number:

Output Formats

After converting a timestamp, the tool displays the result in several standard formats:

FormatExample
ISO 86012024-01-15T10:30:00.000Z
RFC 2822Mon, 15 Jan 2024 10:30:00 +0000
UTCMon, 15 Jan 2024 10:30:00 GMT
LocalJan 15, 2024, 10:30:00 (in selected timezone)
Relative2 years ago

How to Convert an Epoch Timestamp to a Human Date

  1. Paste your epoch value in the Epoch → Date tab.
  2. Select a timezone if needed (defaults to UTC).
  3. Press Convert or hit Enter.
  4. Copy any result format with the copy button.

You can also click Quick Presets to fill in common reference points: Now, Start of today, Start of week, Start of month, Start of year.

How to Convert a Date to an Epoch Timestamp

  1. Switch to the Date → Epoch tab.
  2. Enter a date string in any recognisable format:
    • ISO 8601: 2024-01-15T10:30:00Z
    • ISO 8601 with offset: 2024-01-15T10:30:00+05:30
    • Date-only: 2024-01-15 (treated as UTC midnight)
    • RFC 2822: Mon, 15 Jan 2024 10:30:00 +0000
  3. Press Convert to get the epoch seconds and milliseconds.

Batch Conversion

The Batch tab accepts multiple timestamps, one per line. Paste a list and press Convert to process all of them at once. Each line shows:

Invalid lines are highlighted in red so you can identify and fix them easily.

How to Get the Current Unix Timestamp in Common Languages

// JavaScript — milliseconds
Date.now()
// JavaScript — seconds
Math.floor(Date.now() / 1000)
# Python — seconds (float)
import time; time.time()
# Python — seconds (integer)
import time; int(time.time())
# Bash/Shell
date +%s
// Go — seconds
import "time"
time.Now().Unix()
// Go — milliseconds
time.Now().UnixMilli()
// Java — milliseconds
System.currentTimeMillis()
// Java — seconds
System.currentTimeMillis() / 1000
-- MySQL
SELECT UNIX_TIMESTAMP();
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
-- SQLite
SELECT strftime('%s', 'now');

Common Epoch Reference Values

DescriptionEpoch (seconds)Date (UTC)
Unix epoch origin0Jan 1, 1970 00:00:00
Y2K946684800Jan 1, 2000 00:00:00
Billion-second milestone1000000000Sep 9, 2001 01:46:40
Year 2038 problem limit2147483647Jan 19, 2038 03:14:07
Two-billion-second milestone2000000000May 18, 2033 03:33:20

The Year 2038 Problem (Y2K38)

Many older systems store Unix timestamps as a signed 32-bit integer. The maximum value is 2,147,483,647, which represents January 19, 2038 at 03:14:07 UTC. When this counter overflows it wraps to a large negative number, causing date calculations to fail or produce dates in 1901.

Modern systems mitigate this by using 64-bit integers for timestamps. A signed 64-bit counter won’t overflow until approximately the year 292,277,026,596.

If you work with embedded systems, databases, or legacy code that might still use 32-bit timestamps, migrating to 64-bit storage before 2038 is critical.

Frequently Asked Questions

What is epoch time zero? The Unix epoch origin is midnight January 1, 1970, 00:00:00 UTC. All timestamps are counted from this point. Negative timestamps represent moments before 1970.

Why is the Unix epoch January 1, 1970? When Bell Labs engineers designed Unix in the early 1970s, they needed a fixed reference point that was recent but far enough in the past to represent historical dates. The year 1970 was a convenient round number close to the system’s creation date.

Does a Unix timestamp include timezone information? No. Unix timestamps are always defined relative to UTC. To display a timestamp in a local timezone, convert it to UTC first and then apply the timezone offset. This tool handles that automatically with the timezone selector.

What is the maximum Unix timestamp in 32 bits? A signed 32-bit integer can hold values up to 2,147,483,647, which is January 19, 2038 at 03:14:07 UTC. An unsigned 32-bit integer extends this to 4,294,967,295, corresponding to February 7, 2106.

How precise is a Unix timestamp? Standard Unix timestamps have second-level precision. For millisecond precision, multiply by 1,000. For microsecond or nanosecond precision (used in high-performance systems), you need custom timestamp formats — tools like clock_gettime() in C or time.time_ns() in Python 3.7+.

Is my data sent to a server? No. All timestamp conversions happen entirely in your browser. No data leaves your device.

Related Tools