Unix timestamp converter
DevNo. 75 / 84
Convert epoch seconds or milliseconds to local time and ISO 8601, and turn any date back into a timestamp — live in both directions.
time is a flat circle, and it started in 1970. someone had to pick a year.
work surface
Math, not advice — results are indicative.Read the disclaimer.
most-used utilities
Read a log line
Drop the number from a log entry and get a date a human can argue about.
Check a token
Convert an exp claim from seconds to local time and see whether the session is really over.
Plan a release
Pick the launch time in the date field and hand the build the matching seconds.
pro tips
Ten digits are seconds, thirteen are milliseconds. If a timestamp looks three digits too long, divide by 1,000 before blaming the server.
Epoch values are always UTC; the local card is the only one wearing your time zone. Keep the number, format it late.
Store timestamps in UTC and convert at display time. Your future self, in another time zone, will thank you.
what it does
Unix time counts the seconds since 1 January 1970 at 00:00 UTC, and it has quietly become the default way machines write down a moment. Paste a number and the widget shows the same instant five ways: your local clock, ISO 8601, epoch seconds, epoch milliseconds and how far it sits from now.
It works in the other direction too. Pick a date and time in the local field and the timestamp appears at once, which is the direction people usually need when a cron job, a token or a database row asks for a number and the calendar only speaks in Tuesdays.
Example: 1700000000 is 14 November 2023 at 22:13:20 UTC, or 23:13:20 in central Europe. The same instant in milliseconds is 1700000000000. If a value has 10 digits it is probably seconds, 13 digits usually means milliseconds, and 16 or more is a microsecond or nanosecond stamp from a system with big ambitions.
The conversion uses your browser's date handling, so daylight saving and your time zone are already accounted for. The ISO card always stays in UTC, which is the version to trust when two machines disagree about what time lunch is. Years past 275,760 are politely declined.
quick answers
Is Unix time in seconds or milliseconds?
Both appear in the wild. Ten digits is almost always seconds and thirteen is milliseconds; the unit chips switch without changing the instant, so the cards stay put.
Why is my local time different from the ISO value?
ISO 8601 is printed in UTC with a Z at the end, while the local card follows your time zone and daylight saving. They describe the same moment, just in different clothes.
What about the year 2038 problem?
It affects 32-bit systems that store seconds in a signed integer. Browsers and 64-bit systems are fine, which covers most of what you will meet today.