Nekonote Toolbox logo

Nekonote Toolbox

Free browser-based tools for developers and IT admins.

日本語

Unix Timestamp Converter

Current Unix time
seconds
milliseconds

Timestamp to date

Date to timestamp

About this tool

A Unix timestamp counts the seconds since 1970-01-01 00:00:00 UTC. Paste one to see the date in any time zone, or enter a date to get the timestamp. The unit (seconds, milliseconds, microseconds, nanoseconds) is detected for you.

Everything runs in your browser. Nothing you enter is sent to a server.

How it works

  • Auto-detect looks at the number of digits: up to 11 digits is seconds, up to 14 is milliseconds, up to 17 is microseconds, more is nanoseconds. Dates before 1973 or after 5138 written in seconds may be misread; pick the unit yourself in that case.
  • A Unix timestamp has no time zone. The zone only changes how the date is shown. Daylight saving time is handled by your browser's time zone database, so the offset is correct for the date you enter.
  • When a local time does not exist (the hour skipped when clocks go forward), it is read with the offset from before the change, so 02:30 on the spring-forward day is treated as 03:30 afterwards, the same as JavaScript does. When a local time happens twice (when clocks go back), the first occurrence is used.
  • Microseconds and nanoseconds are rounded to milliseconds, because JavaScript dates have millisecond precision.
  • Negative timestamps (before 1970) work. The usable range is about plus or minus 275,000 years.

FAQ

Q. How do I know whether a timestamp is in seconds or milliseconds?

A. Today's timestamps in seconds have 10 digits (for example 1700000000) and in milliseconds have 13 digits. JavaScript's Date.now() returns milliseconds; most Unix tools, date +%s and PHP's time() return seconds.

Q. What is the year 2038 problem?

A. Systems that store seconds in a signed 32-bit integer overflow on 2038-01-19 03:14:07 UTC (timestamp 2147483647). Try 2147483648 above to see the next second. Use 64-bit integers to avoid it.