Unix timestamp converter

Convert Unix timestamps to readable dates and dates back to timestamps. Seconds, milliseconds, microseconds and nanoseconds are detected for you, and you can paste a whole column at once.

Timestamp or date
Converted
Waiting for a timestamp⌘Enter now

Telling the units apart

The most common timestamp bug is mixing up units. JavaScript and Java use milliseconds; Unix, Python and most databases use seconds; Go and some logging systems use nanoseconds. The same instant looks like this in each:

UnitDigits (today)Example
Seconds101767225600
Milliseconds131767225600000
Microseconds161767225600000000
Nanoseconds191767225600000000000

Leave the unit on Auto and the converter picks the reading that lands between 1971 and 2100. If more than one could be right, it says so and shows each reading; click one to use it.

What gets spotted

  • Wrong unit: a date in 1970 or the far future, with a one-click switch to the unit that makes sense.
  • Thousands separators, as you get when copying from a spreadsheet.
  • Impossible dates like 2026-13-11, with the day-month swap offered as a fix. Missing leading zeros and a space instead of T are fixed too.
  • Ambiguous dates like 03/04/2026, which is 3 April in the UK and March 4 in the US.
  • Date strings without a zone, with the zone that was assumed.
  • Leap-year and range mistakes like 29 February in a non-leap year, hour 24 or minute 60.
  • .NET ticks (DateTime.Ticks), which look like nanoseconds from around 1990.
  • The 2038 limit: seconds past 19 January 2038 won’t fit in a signed 32-bit integer.

Formats it reads

1767225600                      Unix seconds
1767225600000                   Unix milliseconds
2026-01-01T00:00:00Z            ISO 8601 / RFC 3339
2026-01-01 00:00:00+01:00       SQL-style with offset
Thu, 01 Jan 2026 00:00:00 GMT   HTTP date (RFC 7231)

Converting in code

// JavaScript
new Date(1767225600 * 1000).toISOString()   // seconds → ISO
Math.floor(Date.parse('2026-01-01T00:00:00Z') / 1000)

# Python
from datetime import datetime, timezone
datetime.fromtimestamp(1767225600, tz=timezone.utc)

-- PostgreSQL
SELECT to_timestamp(1767225600);

# GNU date / macOS
date -u -d @1767225600      # Linux
date -u -r 1767225600       # macOS

Debugging token expiry? The JWT decoder reads exp and iat for you. Scheduling jobs? See the cron expression explainer.

Questions people ask

What is a Unix timestamp?
The number of seconds since 00:00:00 UTC on 1 January 1970, the “Unix epoch”, not counting leap seconds. It’s the same everywhere in the world at the same instant, which is why it’s used to store and compare times.
Is my timestamp in seconds or milliseconds?
Count the digits. Dates between 2001 and 2286 have 10 digits in seconds and 13 in milliseconds; 16 means microseconds and 19 nanoseconds. The converter picks the unit that gives a sensible date and shows what the number would mean in each of the others.
Why is my date in 1970?
You’ve almost certainly read milliseconds as seconds, or seconds as milliseconds. 1767225600 as milliseconds is 21 January 1970. The converter flags dates near 1970 and offers the unit that makes sense.
What is the year 2038 problem?
Systems that store Unix time as a signed 32-bit integer run out at 2147483647, which is 03:14:07 UTC on 19 January 2038. One second later, the number wraps round to 1901. Modern systems use 64-bit time, but old databases, file formats and embedded devices may not.
How do I get the current timestamp in code?
In JavaScript, Date.now() (milliseconds) or Math.floor(Date.now() / 1000) (seconds). In Python, time.time(). In a shell, date +%s. In PostgreSQL, extract(epoch from now()).
Do timestamps have time zones?
No. A Unix timestamp is always UTC. Time zones only come in when you display it. Date strings are different: a string with no offset, like 2026-11-13 09:30, is read differently by different systems, so the converter tells you which zone it assumed.
↑↓ move↵ openesc close