Unix Timestamp Converter
A Unix timestamp is the number of seconds since 00:00:00 UTC on 1 January 1970. Paste one below to see the date in UTC and in your time zone, written as ISO 8601 / RFC 3339. The converter also works in reverse, and it recognises seconds, milliseconds, microseconds and nanoseconds by itself.
…Now (milliseconds): …Timestamp to date
Try an example
Paste a Unix timestamp to see the date.
Date to timestamp
Try an example
Enter an ISO 8601 / RFC 3339 date-time, or pick one with the date picker.
How the converter works
Unix time counts seconds from the epoch, 00:00:00 UTC on 1 January 1970, and treats every day as exactly 86,400 seconds. The POSIX definition of “seconds since the epoch” spells out that rule, which is why Unix time does not count leap seconds. A timestamp has no time zone of its own. It names one instant, and the zone only matters when you display it.
The page does four things when you press Convert:
- Reads the number exactly. The digits are parsed as an integer plus any decimal part, so nanosecond values keep every digit instead of being rounded the way a floating-point number would be.
- Chooses a unit. With Auto-detect on, the size of the number decides, using the table below. You can override it with the Unit menu.
- Builds the date in UTC. The result is the instant written as an ISO 8601 string ending in
Z. - Shows it in your zone. Your browser's built-in
Intltime zone data, which comes from the IANA database, supplies the local clock reading and the offset for that exact date, so daylight saving is applied for the date you typed and not for today.
How the unit is detected
| Digits (sign ignored) | Read as | Example | Result in UTC |
|---|---|---|---|
| 11 or fewer | Seconds | 1700000000 | 2023-11-14T22:13:20Z |
| 12 to 14 | Milliseconds | 1700000000000 | 2023-11-14T22:13:20.000Z |
| 15 to 17 | Microseconds | 1700000000123456 | 2023-11-14T22:13:20.123456Z |
| 18 or more | Nanoseconds | 1700000000123456789 | 2023-11-14T22:13:20.123456789Z |
This is a heuristic. A current timestamp in seconds has 10 digits and in milliseconds 13, so the rule is reliable for modern dates. It cannot be right for every old value: a millisecond timestamp earlier than 3 March 1973 has 11 digits or fewer and would be read as seconds. If a result looks wrong by a factor of 1,000, set the unit by hand.
Converting a date to a timestamp
Type a date-time in ISO 8601 form, such as 2026-12-05T09:30:00Z, 2026-12-05T09:30:00+08:00 or 2026-12-05 09:30, or use the date picker. If the text includes Z or an offset, that offset is used. If it has none, the value is read as wall-clock time in the zone chosen in the menu, which starts as your device's zone. Fractions of a second up to nine digits are accepted. You get the result in seconds, milliseconds, microseconds and nanoseconds, plus the same instant in UTC and in the chosen zone.
RFC 3339 is the profile of ISO 8601 used by most internet protocols and APIs. It requires the full date and time and a Z or numeric offset, which is why the outputs here always carry one. The RFC 3339 guide lists the small differences from ISO 8601.
Worked examples
| Input | Meaning |
|---|---|
0 | 1970-01-01T00:00:00Z, the epoch itself |
1000000000 | 2001-09-09T01:46:40Z, the moment the count reached one billion seconds |
1700000000 | 2023-11-14T22:13:20Z, which is 17:13:20 in New York (UTC−05:00) and 03:43:20 the next day in Kolkata (UTC+05:30) |
1767225600 | 2026-01-01T00:00:00Z |
1798761600 | 2027-01-01T00:00:00Z, exactly 365 days (31,536,000 seconds) after the line above |
2026-12-05T20:00:00+08:00 | 1796472000 seconds, because 20:00 at UTC+08:00 is 12:00 UTC |
2026-12-05 09:00 read as America/New_York | 1796479200 seconds, which is 14:00:00 UTC |
Negative timestamps and dates before 1970
Counting backwards from the epoch gives negative numbers. -1 is 1969-12-31T23:59:59Z, -86400 is 1969-12-31T00:00:00Z, and -62135596800 is 0001-01-01T00:00:00Z. The converter accepts a leading minus sign and handles fractions correctly, so -0.5 is half a second before the epoch, 1969-12-31T23:59:59.500Z. Negative values are valid in most modern languages, but older code that stores time as an unsigned integer cannot represent them. Dates this far back also use the proleptic Gregorian calendar, which extends today's rules backwards. See the proleptic Gregorian calendar guide for why that matters for historical dates.
The 2038 limit
A signed 32-bit integer holds at most 2,147,483,647. Used as seconds since the epoch, that is 2038-01-19T03:14:07Z. One second later the value no longer fits, and on a system that wraps around it becomes −2,147,483,648, which is 1901-12-13T20:45:52Z. Try 2147483647 and 2147483648 in the converter above: the second one shows a note, because it is later than the 32-bit signed limit. Systems that use 64-bit time are not affected, and an unsigned 32-bit count lasts until 2106-02-07T06:28:15Z (4,294,967,295). The Year 2038 problem guide explains where 32-bit time still hides, such as file formats, embedded devices and database columns.
Getting a timestamp in code
// JavaScript (milliseconds)
Date.now(); // 1700000000000
Math.floor(Date.now() / 1000); // seconds
new Date(1700000000 * 1000).toISOString();
# Python (seconds, UTC)
import time, datetime
int(time.time())
datetime.datetime.fromtimestamp(1700000000, tz=datetime.timezone.utc)
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM now());
SELECT to_timestamp(1700000000);
# Shell
date +%s # now, in seconds
date -u -d @1700000000 # GNU date
date -u -r 1700000000 # macOS / BSD date
Check which unit each API returns. JavaScript's Date.now() is in milliseconds, while Python's time.time() returns seconds as a float. Read the JavaScript date guide, the Python datetime guide and the database timestamps guide for the full picture in each environment.
Edge cases and common mistakes
- Mixing seconds and milliseconds. A 13-digit number read as seconds lands in the year 55,840. A 10-digit number read as milliseconds lands in January 1970. The unit menu exists for these cases.
- Treating a timestamp as local time. It is an instant. Two people in different zones see the same number and different clock readings.
- Using floating point for precision. A 64-bit float holds about 15 to 17 significant digits, so nanosecond timestamps lose their last digits. Keep them as integers or strings. The timestamp precision guide covers this.
- Expecting leap seconds. Unix time repeats or smears a second when UTC adds one, so the difference between two timestamps can differ from the true elapsed time by a second. See the leap second guide.
- Dropping the zone from a date string.
2026-12-05 09:00alone is ambiguous. Add an offset or store the zone name, as the date-only versus timestamp guide recommends. - Dates beyond the supported range. JavaScript dates run to about 275,760 years either side of 1970. Larger values show an error here instead of a wrong answer.
Keep reading
Start with what a Unix timestamp is and why the epoch is 1970. To see a timestamp in another zone, use the time zone converter, and to watch the number tick, open the current time page.
Common questions
What is the current Unix timestamp?
The box at the top of the converter shows it and updates every second. It is the number of seconds since 1 January 1970 00:00:00 UTC, and it is the same number everywhere in the world at the same moment.
How do I know if a timestamp is in seconds or milliseconds?
Count the digits. Ten digits is seconds for any date between 2001 and 2286, and thirteen digits is milliseconds for the same range. With Auto-detect on, the converter applies this rule and tells you which unit it used. You can force a unit with the Unit menu.
How do I convert a Unix timestamp to a date?
Multiply seconds by 1,000 if your tool expects milliseconds, then format the result as UTC or as a named time zone. In this converter, paste the number and read the ISO 8601 line. For example, 1700000000 is 2023-11-14T22:13:20Z.
Can a Unix timestamp be negative?
Yes. Negative values are instants before 1 January 1970. For example, -1 is 1969-12-31T23:59:59Z. Some older software that stores time as an unsigned integer cannot hold them.
What happens on 19 January 2038?
Systems that store Unix seconds in a signed 32-bit integer overflow after 2038-01-19T03:14:07Z, the moment the value 2,147,483,647 is reached. Systems that use 64-bit time keep working, and so does this converter.
Does Unix time include leap seconds?
No. Unix time treats every day as 86,400 seconds, so leap seconds are not counted. When UTC inserts one, Unix clocks either repeat a second or spread the extra second out over a period, depending on the system.
Is my data sent anywhere?
No. The conversion runs in your browser with JavaScript, and the values you type are not uploaded by the tool. The site's analytics and the privacy details are described in the Privacy Policy.
Sources and further reading
- POSIX Base Definitions, General Concepts: Seconds Since the Epoch (The Open Group)
- RFC 3339: Date and Time on the Internet: Timestamps (IETF)
- ISO 8601 date and time format (ISO)
- Date (MDN Web Docs)
- Intl.DateTimeFormat (MDN Web Docs)
- datetime: Basic date and time types (Python documentation)
- Date/Time Types (PostgreSQL documentation)