What is a date and timestamp converter?
A date converter turns a moment in time from one representation into another. The most common case is the Unix timestamp, the number of seconds since 1 January 1970 00:00:00 UTC (the "epoch"), which is how databases, logs, APIs and JWTs store dates, into a human-readable date, and back. Paste 1700000000 and you get 2023-11-14T22:13:20Z; paste a date and you get the timestamp.
The same instant can be written in many formats, and this converter shows them all at once: ISO 8601 and RFC 3339 (the internet profile of ISO 8601, defined in RFC 3339), RFC 7231 (the Sun, 10 Mar 2024 12:00:00 GMT form used in HTTP headers), ISO 9075 (SQL), JavaScript date strings and the Date constructor, Unix time in seconds, milliseconds and microseconds, Windows FILETIME, Excel date serials and even the creation time embedded in a MongoDB ObjectID. The input is detected automatically, so you can paste any of them, including a local date such as 31/12/2024.
Time zones are the usual source of mistakes. A timestamp is always UTC; its calendar date and clock time depend on the zone, and you can choose any IANA zone to see the local reading, or use your computer's zone. A "now (live)" mode shows the current time updating. Everything runs in your browser and nothing is sent anywhere.
How to convert a date or timestamp
- Paste a timestamp, a date or a text date into the input. The page opens with an example.
- If the number can be read in more than one way, the tool says so and lets you pick: for instance
45000is 15 March 2023 as an Excel serial and 1 January 1970 12:30 as Unix seconds. - Choose the time zone for the local reading: your computer's or any other zone.
- Read the list of formats. Each line has a copy button; use ISO 8601 UTC for APIs and logs, RFC 7231 for HTTP headers, Unix for databases.
- Use "now (live)" to see the current time in all formats at once.
Examples
Unix timestamp to date
1700000000 is 2023-11-14T22:13:20Z. In America/Sao_Paulo (UTC−3) the same instant reads 19:13:20 on 14 November 2023.
Seconds, milliseconds and microseconds
JavaScript uses milliseconds, so the same moment is 1700000000000. A 16-digit number is microseconds.
The start and the 2038 limit
0 is 1970-01-01T00:00:00Z. 2147483647, the largest signed 32-bit value, is 2038-01-19T03:14:07Z: systems that store seconds in 32 bits overflow after that moment.
Windows FILETIME
133485408000000000 counts 100-nanosecond intervals since 1 January 1601 and equals 2024-01-01T00:00:00Z.
MongoDB ObjectID
The first 4 bytes of an ObjectID are a timestamp: 507f1f77bcf86cd799439011 starts with 507f1f77 = 1350508407, which is 2012-10-17T21:13:27Z.
HTTP date
2024-03-10T12:00:00Z in RFC 7231 is Sun, 10 Mar 2024 12:00:00 GMT.
Common mistakes
- Mixing seconds and milliseconds. A 10-digit number is seconds; a 13-digit one is milliseconds. A date in 1970 usually means the wrong unit.
- Forgetting the time zone. A timestamp is UTC. A date without a zone is read in the zone you chose, which can shift the day.
- Day and month swapped.
03/04/2024is 4 March in the US and 3 April in most other countries. Prefer ISO 8601 (2024-04-03). - Reading Excel serials as Unix times. Short numbers can be both; check the alternative reading the tool offers.
- Ignoring daylight saving time. Local clock times can repeat or not exist on the DST change day; UTC does not.
- Using local time in logs and APIs. Store UTC and convert only for display.
Frequently asked questions
What is a Unix timestamp?
The number of seconds elapsed since 1970-01-01T00:00:00Z, not counting leap seconds.
How do I convert a Unix timestamp to a date?
Paste it in the converter, or use the code below.
What is ISO 8601?
The international date and time format, such as 2023-11-14T22:13:20Z, where the final Z means UTC.
What is the difference between ISO 8601 and RFC 3339?
RFC 3339 is a stricter profile of ISO 8601 for the internet. Most ISO 8601 timestamps with a zone are valid RFC 3339.
Where can I do date arithmetic or time zones?
Use the date calculator to add or subtract days and find the time between dates, or the time duration converter for hours, minutes and seconds.
How to convert in code
JavaScript
new Date(1700000000 * 1000).toISOString(); // 2023-11-14T22:13:20.000Z
new Date('2023-11-14T22:13:20Z').getTime() / 1000; // 1700000000Python
from datetime import datetime, timezone
datetime.fromtimestamp(1700000000, timezone.utc).isoformat() # 2023-11-14T22:13:20+00:00
int(datetime(2023, 11, 14, 22, 13, 20, tzinfo=timezone.utc).timestamp()) # 1700000000Go
t := time.Unix(1700000000, 0).UTC()
fmt.Println(t.Format(time.RFC3339)) // 2023-11-14T22:13:20Z
fmt.Println(time.Date(2023, 11, 14, 22, 13, 20, 0, time.UTC).Unix()) // 1700000000Bash
date -u -d @1700000000 +%Y-%m-%dT%H:%M:%SZ # GNU/Linux
date -u -r 1700000000 +%Y-%m-%dT%H:%M:%SZ # macOS and BSD