Unix Timestamp

Convert between Unix timestamps and human-readable dates

100% free. Runs entirely in your browser - your files and data never leave your device and nothing is uploaded to any server.

Current Unix Timestamp

1792831657

Sat, 24 Oct 2026 08:47:37 +0000

Milliseconds1792831657985

Detected: Seconds

Local time (UTC+5)

Saturday, October 24, 2026 at 01:47:37 PM

UTC

Sat, 24 Oct 2026 08:47:37 +0000

ISO 8601

2026-10-24T08:47:37.000Z

Seconds

1792831657

Milliseconds

1792831657000

Relative

1 second ago

Calendar

ISO week 43 · Day 297 of the year

Get the current timestamp in code

JavaScript
Math.floor(Date.now() / 1000)
Python
import time
int(time.time())
PHP
time();
Java
Instant.now().getEpochSecond();
Go
time.Now().Unix()
C#
DateTimeOffset.UtcNow.ToUnixTimeSeconds();
PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
MySQL
SELECT UNIX_TIMESTAMP();
Bash
date +%s

About this tool

A Unix timestamp represents a point in time as the number of seconds since January 1, 1970 (the "Unix epoch") - widely used in programming and databases because it's a simple, unambiguous number rather than a formatted date string. This tool converts between Unix timestamps and human-readable dates in either direction.

How to use this tool

  1. Pick a directionTimestamp to date, date to timestamp, or batch convert a whole list - one tab each.
  2. Enter your valuePaste a timestamp such as 1704067200, or choose a date and time. Quick buttons fill in now, +1 hour, +1 day or today at midnight UTC.
  3. Check the detected unitThe unit is read from the length: 10 digits is seconds, 13 milliseconds, 16 microseconds, 19 nanoseconds. A value that comes out in 1970 or far in the future usually means the wrong unit was pasted.
  4. Pick a time zoneResults show in your local time by default; type any city or IANA zone, such as Asia/Tokyo, to see the same moment there.
  5. Copy the format you needLocal time, UTC (RFC 2822), ISO 8601, seconds, milliseconds and a relative time ("3 days ago") each have their own copy button.

Seconds or milliseconds?

A Unix timestamp in seconds has 10 digits today (for example 1767225600 is 1 January 2026 at 00:00 UTC). JavaScript and many APIs use milliseconds, which have 13 digits. If a timestamp converts to a date in 1970, it was probably milliseconds treated as seconds - or the other way round.

Timestamps are always in UTC; the time zone only matters when you display them as a date.

Key features

  • Shows the detected unit next to the input, so a 1,000x mistake is visible before you use the result.
  • Converts in any time zone, with daylight saving handled for the date you enter.
  • Batch mode converts up to 500 timestamps at once and copies the table as CSV.
  • Gives ISO 8601 and RFC 2822 output, the formats most APIs, logs and email headers use.
  • Includes one-line code for the current timestamp in JavaScript, Python, PHP, Java, Go, C#, SQL and Bash.

Common uses

  • Developers debugging an API response that returns raw epoch values.
  • Checking whether a token or cache entry has already expired.
  • Reading timestamps out of a database export or a log file.
  • Converting a date into a timestamp for a query parameter or a test fixture.
  • Confirming that a scheduled job fired at the time you expected.

Tips for better results

  • If your converted date lands in 1970, the value was almost certainly milliseconds interpreted as seconds. Switch the unit.
  • Store timestamps in UTC and convert only for display. It removes an entire category of daylight-saving bugs.
  • ISO 8601 is the safest format for passing dates between systems - it is unambiguous about both the timezone and the field order.
  • A negative timestamp is valid and means a date before 1970.

Mistakes to avoid

  • Mixing seconds and milliseconds. A JavaScript Date.now() value is 1,000x a standard Unix timestamp.
  • Assuming a timestamp carries a timezone. It does not - it is always an instant in UTC, and the timezone only affects how you display it.
  • Using a 32-bit integer for timestamps. Those overflow in January 2038, which is a real constraint in older systems.
  • Comparing timestamps from different units without normalising them first.

Frequently asked questions

The number of seconds that have elapsed since 1 January 1970 at 00:00:00 UTC, known as the Unix epoch. It is a single number that represents an exact instant, which is why databases and APIs prefer it over formatted dates.

Paste the number into the timestamp field above and the date appears immediately in local time, UTC and ISO 8601 format. Make sure the seconds/milliseconds toggle matches your value.

Almost always a unit mismatch. Your value is in milliseconds but is being read as seconds, so it lands only a few hours after the epoch. Switch the toggle to milliseconds.

A standard Unix timestamp counts seconds, giving a 10-digit number today. JavaScript's Date.now() returns milliseconds, giving 13 digits. If your number has 13 digits, it is milliseconds.

No. It always represents an instant in UTC. Timezones only matter when you format it for display, which is why this tool shows both your local time and UTC.

An international standard for writing dates and times, such as 2026-01-01T00:00:00Z. It is unambiguous about field order and timezone, making it the safest format to exchange between systems.

Systems storing timestamps in a signed 32-bit integer overflow on 19 January 2038, wrapping to a negative number and appearing as 1901. Modern systems use 64-bit values, which pushes the limit far beyond any practical concern.

Yes. Negative values represent dates before 1 January 1970. Some older systems and libraries handle these poorly, so test if you rely on them.

The page shows it live and updates as you watch, so you can copy the current epoch value directly.

A single integer is compact, sorts correctly, is trivially comparable, and has no formatting or locale ambiguity. Formatted dates invite parsing bugs across systems.

No. All conversion happens in your browser using the built-in date functions. Nothing is uploaded.

Use the date-to-timestamp side of the tool. Pick your date and time, and the epoch value in both seconds and milliseconds is produced.