Unix Timestamp Converter – Epoch Time to Date and Back
Convert a Unix (epoch) timestamp into a readable date and time in UTC and in your own time zone, or turn a date into a timestamp. The converter detects whether your number is in seconds or milliseconds and shows how long ago — or how far ahead — it is.
How to use the Unix timestamp converter
Timestamp to date:
- Choose Timestamp → date.
- Paste a timestamp in seconds or milliseconds. It starts with the current timestamp.
You’ll see the date and time in your time zone and in UTC, the ISO 8601 form, and a relative time such as “3 days ago”.
Date to timestamp:
- Choose Date → timestamp.
- Pick the date and time, and whether that time is in your time zone or UTC.
You’ll see the timestamp in seconds and milliseconds and the ISO 8601 date.
How the conversion works
A day is 86,400 seconds, so dividing a timestamp by 86,400 gives the number of days since 1970.
Examples
| Timestamp | Date (UTC) |
|---|---|
| 0 | 1 January 1970, 00:00:00 |
| 1000000000 | 9 September 2001, 01:46:40 |
| 1700000000 | 14 November 2023, 22:13:20 |
| 2000000000 | 18 May 2033, 03:33:20 |
| 2147483647 | 19 January 2038, 03:14:07 |
Timestamps in different languages
- JavaScript:
Date.now()returns milliseconds;new Date(ts * 1000)converts seconds. - Python:
time.time()returns seconds;datetime.fromtimestamp(ts, tz=timezone.utc)converts. - PHP:
time()anddate('c', $ts). - SQL:
UNIX_TIMESTAMP()in MySQL,EXTRACT(EPOCH FROM now())in PostgreSQL. - Shell:
date +%s, anddate -d @1700000000on Linux.
Leap seconds and time zones
Unix time ignores leap seconds: every day is treated as exactly 86,400 seconds, which keeps calculations simple. A timestamp also has no time zone — it is the same number everywhere at the same instant. The time zone only matters when you turn it into a calendar date and clock time, which is why the converter shows both your local time and UTC.
When you convert a date into a timestamp, be clear about which time zone the date is in. 9:00 am in New York and 9:00 am in Nairobi are eight hours apart, so they give different timestamps. Use the UTC option for times taken from logs and servers.
Timestamps in milliseconds are common in JavaScript, Java and many web APIs, while databases and Unix tools usually use seconds.
Tips
- Store times in UTC and convert to local time only for display.
- Check the units when an API date looks wrong — a date in 1970 usually means seconds were read as milliseconds, and a date tens of thousands of years ahead means the reverse.
- ISO 8601 strings such as 2026-11-08T09:00:00Z are easier for humans to read and also sort correctly as text.
For converting a local time between cities, use the time zone converter. To inspect token expiry times, the JWT decoder shows them as dates. Everything runs in your browser.
Frequently asked questions
What is a Unix timestamp?
The number of seconds since 00:00:00 UTC on 1 January 1970, called the Unix epoch, not counting leap seconds. It is the same everywhere in the world at a given moment, which makes it ideal for computers, databases and APIs.
What date is 1700000000?
Tuesday 14 November 2023 at 22:13:20 UTC.
Seconds or milliseconds?
Unix timestamps are traditionally in seconds (10 digits today). JavaScript and many APIs use milliseconds (13 digits). The converter treats numbers of 100 billion or more as milliseconds.
How do I get the current timestamp?
The converter fills in the current time when the page opens. In code: Math.floor(Date.now() / 1000) in JavaScript, time.time() in Python, or date +%s in a Unix shell.
What is the Year 2038 problem?
Systems that store timestamps as signed 32-bit integers overflow at 03:14:07 UTC on 19 January 2038. Modern systems use 64-bit values, which last for billions of years.
Can timestamps be negative?
Yes. Negative values are dates before 1970 — for example −86400 is 31 December 1969.
Related tools
Time Zone Converter
Convert a time between zones, with daylight saving handled for you.JSON Formatter
Pretty-print, validate and minify JSON with clear error positions.UUID Generator
Generate v4 or v7 UUIDs in bulk with secure randomness.Week Number Calculator
ISO and US week numbers, and the dates of any week.Cron Expression Explainer
Cron schedules explained in plain English, with next run times.
Last updated: