Codepackr / utilities / Unix Timestamp Converter

Unix Timestamp Converter

Convert Unix epoch timestamps to human-readable dates and vice versa.

Client-Side Execution & Privacy Guarantee

This utility executes 100% locally in your web browser. Your inputs, tokens, queries, and data payloads are never transmitted to any external server or backend.

Unix timestamps count the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, the Unix epoch. This integer representation is used by operating systems, databases, log files, JWT claims, and many programming languages because it is timezone-independent and easy to compare or store. JavaScript’s Date.now() and some APIs return milliseconds instead, producing a 13-digit number rather than the more common 10-digit second value.

This converter accepts either form, detects the unit from the number of digits, and shows the corresponding moment in UTC, your local time zone, and ISO 8601 format. You can also enter a calendar date and time to obtain the matching epoch value. All calculations stay inside your browser using the standard Date object; nothing is sent to a server.

Seconds versus milliseconds

A current Unix timestamp in seconds has ten digits (for example 1735689600). The same instant expressed in milliseconds has thirteen digits (1735689600000). The converter treats any integer longer than ten digits as milliseconds and divides by 1000 before interpreting it as an absolute time. Values shorter than ten digits are accepted as seconds and are useful for historical dates before 2001.

Because the underlying count is always relative to UTC, the same numeric timestamp represents the identical instant everywhere on Earth. Time-zone differences appear only when the number is rendered as a human-readable date. The tool therefore displays both the UTC form and the local form derived from your browser’s time-zone setting.

ISO 8601 and local display

ISO 8601 strings such as 2025-01-01T00:00:00Z are unambiguous and sortable. The converter produces this form with the Z suffix to indicate UTC. It also shows a locale-aware local time string that follows the date and time formatting conventions of your operating system.

When you supply a date, the tool constructs a Date object in your local time zone and then extracts the corresponding UTC epoch seconds. This lets you answer questions such as “what epoch value corresponds to midnight on New Year’s Day in my time zone?” without manual arithmetic.

Range and precision limits

JavaScript’s Date object can represent dates from approximately 271821 BC to 275760 AD, which is far beyond any practical Unix timestamp. The converter therefore accepts any integer that fits in a 64-bit safe integer and maps it correctly. Fractional seconds are not stored in classic Unix timestamps; if you paste a number with a decimal point the fractional part is ignored.

Negative timestamps correctly represent moments before the epoch. For example, -86400 is 31 December 1969 00:00:00 UTC. The tool displays these historical values without special handling.

When to use this tool

  • Translating a log line or database column that stores epoch seconds into a readable date
  • Generating the correct epoch value for a scheduled job or cache expiry
  • Comparing timestamps that arrived from JavaScript (milliseconds) and from a backend (seconds)
  • Verifying the exp or iat claim inside a JWT without leaving the browser
  • Converting a calendar date into the integer expected by a Unix API or SQL EXTRACT(EPOCH FROM ...)

How to use the Unix Timestamp Converter

  1. Paste a 10-digit or 13-digit integer into the timestamp field, or click the current-time button to load the present moment.
  2. The tool automatically decides whether the number is in seconds or milliseconds and shows UTC, local, and ISO 8601 representations.
  3. To go the opposite direction, use the date and time picker; the corresponding epoch seconds appear in the timestamp field.
  4. Copy the value you need with the provided buttons; the raw integer is also selectable.
  5. If the result looks one hour off, check whether your browser time zone is set to the expected offset; the converter itself does not apply an extra offset.
  6. For dates before 1970, simply enter a negative number or pick the date in the picker.
  7. All work stays in the browser; you can disconnect from the network after the page has loaded.

Worked examples

Epoch seconds to ISO date

Input
1609459200
Output
2021-01-01T00:00:00.000Z (UTC)
Friday, 1 January 2021 00:00:00 UTC (local time depends on your zone)

1609459200 is the classic Unix timestamp for the start of 2021 in UTC.

Milliseconds and reverse conversion

Input
Date: 2024-07-04 12:00:00 UTC
Output
1720094400

Entering 4 July 2024 at noon UTC yields the ten-digit epoch seconds value 1720094400.

Common mistakes and tips

  • Count the digits: ten means seconds, thirteen means milliseconds. The converter does this for you, but knowing the convention prevents confusion when you copy values between systems.
  • Never assume a timestamp is local. Always confirm whether the source stored UTC seconds; the number itself carries no time-zone information.
  • JavaScript Date objects use milliseconds internally. When you call getTime() you receive a 13-digit value; divide by 1000 if an API expects classic Unix seconds.
  • Leap seconds are ignored by Unix time. The converter therefore matches the behavior of virtually every programming language and database.
  • If a timestamp looks far in the future or past, double-check that you did not accidentally paste milliseconds into a field that expects seconds, or vice versa.

Frequently asked questions

Does a Unix timestamp include a time zone?

No. The number counts seconds since 1970-01-01 00:00:00 UTC. Time-zone conversion happens only when the number is displayed as a calendar date.

Why do some timestamps have 13 digits?

They are in milliseconds. JavaScript’s Date.now(), Java’s System.currentTimeMillis(), and many front-end libraries use milliseconds. Divide by 1000 to obtain classic Unix seconds.

Can I convert dates before 1970?

Yes. Negative numbers represent moments before the epoch and are displayed correctly.

Is the conversion exact?

Yes, within the limits of the IEEE-754 safe integer range used by JavaScript. Fractional seconds are truncated.

Does the tool send my timestamp anywhere?

No. The entire conversion is performed with the browser’s built-in Date object. No network request is made.