Developer Tools

Unix Timestamp Converter

Convert Unix timestamps in seconds, milliseconds, microseconds or nanoseconds to dates in any time zone, and back.

Current Unix time
—

Timestamp → date

Detected unit: seconds

UTC
2023-11-14 22:13:20
UTC
2023-11-14 22:13:20
ISO 8601
2023-11-14T22:13:20Z
RFC 2822 / HTTP
Tue, 14 Nov 2023 22:13:20 GMT
Readable
Tuesday, November 14, 2023 at 10:13:20 PM UTC

Date → timestamp

Format YYYY-MM-DD HH:mm:ss is read in the selected time zone. Add Z or +08:00 for a fixed offset.

About this tool

A Unix timestamp (also called epoch time or POSIX time) counts the seconds since 1 January 1970 00:00:00 UTC, ignoring leap seconds. Because it is a single number with no time zone, it is how databases, log files, APIs and JWT tokens store moments in time. The catch is that people cannot read it, and different systems use different units: seconds in Unix and PHP, milliseconds in JavaScript and Java, microseconds or nanoseconds in some databases and Go.

This converter detects the unit automatically from the number of digits and shows the moment in the time zone you choose, in UTC, as ISO 8601 and as an HTTP date. It also works the other way: type a date and time, pick a zone, and get the timestamp in all four units. Daylight saving time is handled through your browser's time-zone database.

How to use Unix Timestamp Converter

  1. The live clock at the top shows the current Unix time in seconds and milliseconds; copy either with one click.
  2. Select a time zone. It defaults to your device's zone; every IANA zone is available.
  3. To convert a timestamp, paste it into "Timestamp → date". The unit is detected automatically (10 digits = seconds, 13 = milliseconds), or force it with the buttons.
  4. To convert a date, type it in "Date → timestamp" as YYYY-MM-DD HH:mm:ss. It is read in the selected zone unless you add Z or an offset like +08:00.
  5. Copy any line of the result with its Copy button.

Examples

Seconds to date

Input
1700000000
Result
2023-11-14 22:13:20 UTC · 2023-11-15 06:13:20 in Asia/Shanghai

Milliseconds from JavaScript

Input
1700000000000
Result
Detected as milliseconds → 2023-11-14T22:13:20Z

Date.now() returns milliseconds; divide by 1000 for a Unix timestamp in seconds.

The year 2038 limit

Input
2147483647
Result
2038-01-19 03:14:07 UTC

The largest value a signed 32-bit integer can hold. One second later, old 32-bit systems overflow.

Seconds, milliseconds, microseconds, nanoseconds

  • Seconds (10 digits today): Unix date +%s, PHP time(), Python int(time.time()), MySQL UNIX_TIMESTAMP(), JWT exp/iat claims.
  • Milliseconds (13 digits): JavaScript Date.now(), Java System.currentTimeMillis(), many JSON APIs.
  • Microseconds (16 digits): PostgreSQL internals, Python time.time_ns() // 1000, some analytics tools.
  • Nanoseconds (19 digits): Go time.Now().UnixNano(), InfluxDB and Prometheus remote-write.
  • A frequent bug is mixing them up: a millisecond value read as seconds lands tens of thousands of years in the future, while seconds read as milliseconds land in January 1970.

Time zones and daylight saving time

A timestamp is the same everywhere; only its display depends on the zone. 1700000000 is 22:13 in London and 06:13 the next day in Beijing. When you convert a local date to a timestamp you must say which zone it is in, which is why this tool asks.

During a daylight-saving change some local times happen twice (autumn) or not at all (spring). For an ambiguous or missing time, the converter picks the offset that is in effect right after the change, the same rule most libraries use. Add an explicit offset if you need a particular one.

Frequently asked questions

Everything you need to know about this tool and data security.

Why is my timestamp shown as a date in 1970?

The value is probably in seconds but was treated as milliseconds, or it is very small. Set the unit to "s" or check that the number has 10 digits.

Does a Unix timestamp include leap seconds?

No. Unix time pretends every day has exactly 86,400 seconds, so a leap second is not counted separately. For almost all applications this makes no difference.

Can timestamps be negative?

Yes. Negative values are moments before 1970; for example −86400 is 31 December 1969 00:00:00 UTC.

What is ISO 8601?

The international date format, such as 2023-11-14T22:13:20Z. The Z means UTC; an offset like +08:00 means local time eight hours ahead of UTC. It sorts correctly as text and is the safest format for APIs.

Is my data safe when using this tool?

Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.