Skip to content

Unix Timestamp Converter

Convert an epoch timestamp to a UTC or local date and time. Check the detected unit when working with Unix seconds and milliseconds.

Runs in your browser Free, no sign-up
Loading tool workspace...

What is Unix Timestamp Converter?

This Unix timestamp converter, also called an epoch converter, turns epoch time into a human-readable date and time, and dates back into timestamps. A Unix timestamp is the number of seconds since 1 January 1970 00:00:00 UTC, the Unix epoch; for example 1700000000 is 14 November 2023 at 22:13:20 UTC. Databases, logs, APIs and JWT claims such as iat and exp store time this way because it is compact and time-zone independent.

Paste a timestamp and the converter shows it as a UTC date, in ISO 8601 format (2023-11-14T22:13:20.000Z), in your local time zone and relative to now ("2 years ago"); it detects whether the value is in seconds, milliseconds, microseconds or nanoseconds from its length. To go the other way, type a date such as 2024-03-15 14:30 and get the timestamp in seconds and milliseconds. The current Unix time is shown live at the top.

How to use Unix Timestamp Converter

  1. Paste a Unix timestamp; seconds (10 digits), milliseconds (13), microseconds (
  2. and nanoseconds (
  3. are detected automatically.
  4. Read the UTC, ISO 8601, local and relative dates, plus the value in seconds and milliseconds.
  5. To convert a date, type it in the Date → timestamp box, such as 2024-03-15 14:30:00, and choose whether it is local time or UTC.
  6. Copy the value you need, or click Now to load the current time.

Key features

  • Timestamp to date and date to timestamp
  • Detects seconds, milliseconds, microseconds and nanoseconds
  • UTC, ISO 8601, local and relative time
  • Local time or UTC for dates without a time zone
  • Live current Unix timestamp with copy buttons
  • Runs entirely in your browser

Common use cases

  • Reading created_at and updated_at values in databases and APIs
  • Checking JWT iat, nbf and exp claims
  • Converting timestamps in server, application and CloudWatch logs
  • Debugging time zone issues between UTC and local time
  • Getting the current epoch time for scripts and tests

Technical details & standards

The unit is detected from the number of digits: up to 11 digits are seconds, as used by Unix tools, Python's time.time() and JWT claims; 12 to 14 are milliseconds, as used by JavaScript's Date.now() and Java's System.currentTimeMillis(); 15 to 17 are microseconds and 18 to 20 nanoseconds, as used by some databases and Go's time.UnixNano(). Negative values are dates before 1970, and decimal seconds are accepted.

Dates can be typed as 2024-03-15, 2024-03-15 14:30, 2024-03-15T14:30:00.250Z or with an offset such as +05:30; without a zone they are read in your local time or in UTC, as you choose, and impossible dates such as 30 February are rejected. RFC 2822 dates like Fri, 15 Mar 2024 14:30:00 GMT also work. Unix time ignores leap seconds, so every day is exactly 86,400 seconds, and systems that store it as a signed 32-bit integer overflow on 19 January 2038 at 03:14:07 UTC (2147483647), the Year 2038 problem.

Check the unit on a Unix timestamp

Try this input in the workspace above.

  1. Convert 1704067200 as seconds or 1704067200000 as milliseconds.

Result: Both values represent January 1, 2024 at 00:00:00 UTC. If the date is close to 1970 or far in the future, check whether you chose the wrong unit.

Frequently asked questions

What is a Unix timestamp?

The number of seconds that have passed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It is the same everywhere in the world, which makes it a convenient way to store moments in time.

How do I tell seconds from milliseconds?

By length: current timestamps in seconds have 10 digits (such as 1700000000), in milliseconds 13 (1700000000000), in microseconds 16 and in nanoseconds 19. The converter detects the unit automatically and shows which one it used.

How do I convert a date to a Unix timestamp?

Type the date in the Date → timestamp box, for example 2024-03-15 14:30:00, and pick local time or UTC. In code: Math.floor(new Date("2024-03-15T14:30:00Z").getTime() / 1000) in JavaScript, or date -d "2024-03-15 14:30 UTC" +%s in a Linux shell.

How do I get the current Unix timestamp?

It is shown live at the top of the tool. In code: Math.floor(Date.now() / 1000) in JavaScript, int(time.time()) in Python, time() in PHP, System.currentTimeMillis() / 1000 in Java, and date +%s in a terminal.

What is the Year 2038 problem?

Systems storing Unix time as a signed 32-bit integer can count only up to 2147483647, which is 03:14:07 UTC on 19 January 2038. After that the value overflows. Modern systems use 64-bit integers, which last for billions of years.

How do I convert a Unix timestamp to a datetime?

Paste it above to see the date and time in UTC, ISO 8601 and your local time. In code: new Date(1700000000 * 1000).toISOString() in JavaScript gives 2023-11-14T22:13:20.000Z, datetime.fromtimestamp(1700000000, tz=timezone.utc) in Python, and FROM_UNIXTIME(1700000000) in MySQL.

How do I convert epoch time to IST?

India Standard Time is UTC+5:30, so add 5 hours 30 minutes to the UTC time: 1700000000 is 22:13:20 UTC on 14 November 2023, which is 03:43:20 IST on 15 November. If your device is set to Indian time, the converter's local time row already shows IST.

Is my data safe?

Processing happens locally in your browser. Tool input is not sent to CodeUnpack servers.

Does it work offline?

Once the page has loaded, this tool can process input without an internet connection.

More converters tools

View all