Unix Timestamp to Date Converter — Seconds, Negative & Batch
Convert Unix timestamps (in seconds) to readable dates and times — and any date back to its Unix timestamp. The tool shows the UTC date, an optional timezone-adjusted time, relative time ("3 days ago"), ISO 8601 format and milliseconds. Furthermore, negative timestamps (dates before 1 January 1970) are supported — useful for historical data processing. The Batch tab converts up to 300 timestamps at once with relative time for each.
| Format | Result |
|---|
| Type | Value |
|---|
| Timestamp | Date & time | Relative |
|---|
How to use the Unix Timestamp to Date Converter
Unix timestamp formats in common use
Unix timestamps appear in multiple precision levels across different systems. Furthermore, knowing which precision a given timestamp uses is the first step in conversion — a 10-digit number is seconds; 13 digits is milliseconds; 16 digits is microseconds.
| Format | Digits | Example (1 Jan 2025 00:00 UTC) | Used by |
|---|---|---|---|
| Seconds | 10 | 1735689600 | POSIX, C, Python time.time(), shell |
| Milliseconds | 13 | 1735689600000 | JavaScript Date.now(), Java, Kafka |
| Microseconds | 16 | 1735689600000000 | PostgreSQL, Python datetime.timestamp()*1e6 |
| Nanoseconds | 19 | 1735689600000000000 | Go time.UnixNano(), some IoT systems |
Negative Unix timestamps
The Unix epoch is 1 January 1970 00:00:00 UTC. Furthermore, timestamps before this date are negative integers. The timestamp −86400 represents 31 December 1969 00:00:00 UTC. Moreover, many modern systems support negative timestamps — PostgreSQL, Python's datetime module and JavaScript's Date object all handle them correctly. However, 32-bit systems and legacy C code may not support negative timestamps due to integer overflow.
How Unix timestamps work
A Unix timestamp counts the number of seconds elapsed since the Unix epoch — 1 January 1970 00:00:00 UTC. Furthermore, this is a continuous count that never resets and ignores leap seconds. The result is a language-agnostic, timezone-agnostic integer that uniquely identifies any moment in time.
Milliseconds = Unix timestamp × 1,000
Microseconds = Unix timestamp × 1,000,000
Negative timestamps = dates before 1 January 1970 UTC
The Year 2038 problem
On 32-bit systems, the Unix timestamp is stored as a signed 32-bit integer — which overflows on 19 January 2038 at 03:14:07 UTC (timestamp 2,147,483,647). Furthermore, after this moment, 32-bit systems wrap around to the most negative 32-bit integer — representing 13 December 1901. This "Year 2038 problem" affects legacy embedded systems, IoT devices and old C code. Moreover, 64-bit systems extend the valid range to the year 292,277,026,596 CE — effectively solving the problem for modern software.
Worked example: reading a server log timestamp
A server log shows an error at Unix timestamp 1735689600. A developer needs to know when this occurred and how long ago it was.
| Field | Value |
|---|---|
| Unix timestamp | 1735689600 |
| UTC ISO 8601 | 2025-01-01T00:00:00Z |
| UTC long form | 1 January 2025 00:00:00 UTC |
| UAE local time (UTC+4) | 1 January 2025 04:00:00 GST |
| Milliseconds | 1735689600000 |
What is a Unix timestamp?
A Unix timestamp (also called POSIX time or epoch time) counts seconds elapsed since 1 January 1970 00:00:00 UTC. Furthermore, it is the most widely used machine-readable time format in software engineering. Operating systems, databases, log files, APIs and networking protocols all use Unix timestamps as a universal time representation.
The Unix timestamp's key strength is its simplicity. Furthermore, it is a single integer — timezone-agnostic, language-agnostic and platform-agnostic. Any two systems anywhere in the world that record the same Unix timestamp have recorded the exact same moment in time. Moreover, arithmetic on Unix timestamps is trivial: subtracting two timestamps gives elapsed time in seconds, without any month or year boundary calculation required.
Unix timestamps in databases and APIs
Most SQL databases offer timestamp conversion functions — PostgreSQL's to_timestamp(), MySQL's FROM_UNIXTIME() and SQLite's datetime(). Furthermore, REST APIs commonly return timestamps as Unix integers in JSON responses. Moreover, log aggregation systems like Elasticsearch and Splunk accept Unix timestamps for time-based querying. Understanding Unix timestamps is a fundamental skill for any developer or data engineer working with time-series data.
Why Unix timestamp conversion matters
Server logs, database exports and API responses frequently contain Unix timestamps that humans cannot read directly. Furthermore, debugging production incidents requires quickly converting timestamps from log entries to understand when errors occurred and in what order. Moreover, the relative time display ("3 days ago") immediately contextualises the severity of an issue in an incident postmortem.
Data analysts working with time-series data often receive CSV exports from databases with Unix timestamp columns. Furthermore, converting these to human-readable dates before analysis — or after transformation — is a routine preprocessing step. Moreover, the batch converter reduces this from a manual formula-writing task in Excel to a 10-second paste-and-convert operation.
The importance of timezone awareness
Unix timestamps are always in UTC — timezone is not encoded in the timestamp. Furthermore, displaying a timestamp as a human-readable date requires specifying a timezone offset. A Unix timestamp representing noon UTC becomes different clock times in different regions — 16:00 UAE time, 17:30 India time, 20:00 Singapore time. Moreover, bugs caused by mismatched timezone assumptions are among the most common sources of date-related defects in software systems.
Frequently asked questions
Related Date & Time tools
Every tool on LazyTools runs in your browser. Nothing is uploaded or stored.
Milliseconds to Date Converter
Convert millisecond timestamps to dates. Furthermore, a duration calculator shows elapsed time between two timestamps.
→Excel Serial Date Converter
Convert Excel serial dates. Furthermore, batch mode converts 500 serial numbers at once with CSV export.
→Julian Day Number Converter
Convert dates to astronomical Julian Day Numbers. Furthermore, code snippets for Python, JavaScript, SQL and Excel are included.
→Online Date Format Converter
Convert dates between ISO, US, EU and 12 other formats. Furthermore, batch mode converts 100 dates at once.
→Date Difference Calculator
Calculate exact gaps between two dates. Furthermore, milestone markers show every 100th and 1000th day automatically.
→World Clock
See the current time in major cities worldwide. Furthermore, Gulf and Middle East city defaults are included.
→