
Unix Timestamps: Convert Epochs and Avoid Time Zone Mistakes
Convert a Unix epoch to a readable date and back, tell seconds from milliseconds, and avoid time zone, JWT and clock change traps, all in your browser.
An epoch is a count of seconds with no time zone
A number such as 1710000000 or 1710000000000 turns up in a log line, an API response, a JWT or a database column. It counts the time elapsed since 1 January 1970 at 00:00:00 UTC, counted as seconds or as milliseconds. It carries no time zone. The Unix timestamp converter turns an epoch into a date and a date into an epoch. Empty fields follow a live clock. Type an epoch, an ISO date or a local date and time, and the other two fields update. A table gives the epoch as seconds and as milliseconds, then ISO 8601, RFC 2822, an SQL datetime, a text in your language and a relative time. It shows them in UTC or in your browser's time zone. The conversion happens in your tab and nothing is sent. This guide reads an epoch digit by digit, then shows what a time zone changes and what it leaves alone. It covers the mistakes that cost the most: seconds read as milliseconds, a JWT that never expires, a date written without a zone and a clock change. It also gives the limits of 2038 and of other epochs, and the same conversions in JavaScript, Python, a shell and Java. Related tools are listed in the developer utilities hub.
What the converter is for, and where it stops
The converter answers two questions: which moment does this number name, and which number names this moment?
exp, iat and nbf claims of a token by pasting each number and setting the unit to SecondsThe converter reads one value at a time. The rest of the chain is checked somewhere else.
exp as the raw number from the payload, and the JWT guide explains the claims09/Mar/2024:16:00:00 +0000, which the converter rejects. Rewrite it as 2024-03-09T16:00:00+00:00 firstIntl.DateTimeFormat or your language's time zone library (see the code below)Reading a value without mistakes
In Auto mode the tool counts the digits of the whole part, ignoring the sign. The examples below can be pasted into the Unix epoch field.
1710000000 has 10 digits and is read as seconds: Saturday 9 March 2024 at 16:00:00 UTC. The badge says "Inferred: seconds"1710000000000 has 13 digits and is read as milliseconds. It gives the same moment, and the badge says "Inferred: milliseconds"1000000000) to 20 November 2286 (9999999999), a seconds epoch has 10 digits. Over the same period a milliseconds epoch has 13 digits10000000000 has 11 digits and is read as milliseconds: 26 April 1970 at 17:46:40 UTC. Read as seconds, a value of that size would be the year 22861710000000 read as milliseconds is 20 January 1970 at 19:00:00 UTC. Set Unit to Milliseconds to see it1710000000000 read as seconds gives +056157-09-28T16:00:00.000Z. Set Unit to Seconds to see itThe Unix epoch field accepts digits, an optional minus sign and a decimal point.
1710000000.5 is 16:00:00.500 UTC. Python's time.time() returns this kind of value: seconds with a fraction1710000000.123456 gives 16:00:00.1230 is 1 January 1970 at 00:00:00 UTC, -1 is 31 December 1969 at 23:59:59 and -86400 is 31 December 1969 at 00:00:00. POSIX leaves negative values undefined, but JavaScript and Python handle them1710000000,5), an exponent (1e9) and a hexadecimal value are refused with "Could not parse this input"Take 1710000000. The epoch does not change, only its reading does. Switch Timezone to Local to see the line for your own zone.
Type a date in the ISO / date text field to get its epoch. The result depends on what you wrote after the time. The values below were checked in Node 26, which uses the same JavaScript engine as Chrome. Other browsers may read the non-ISO forms differently.
2024-03-09T16:00:00Z gives 1710000000 in every browser zone, because the Z says UTC2024-03-09T16:00:00+01:00 gives 1709996400, which is 15:00 UTC2024-03-09T16:00:00 has no offset and is read in the zone of the browser: 1710000000 in UTC, 1709996400 in Paris, 1710018000 in New York and 1709967600 in Tokyo2024-03-09, a date alone, is read as midnight UTC: 1709942400 in every zone. Adding a time without an offset changes the rule2024-03-09 16:00:00 with a space and March 9, 2024 are not ISO forms. the engine tested here reads them in local time, and the standard leaves the rule to each engine09/03/2024 is read with the month first, as 3 September 2024. A format with day first needs rewriting as ISOSat, 09 Mar 2024 16:00:00 GMT, the RFC 2822 form from HTTP headers, is understood and gives 1710000000Five mistakes you only see in production
JavaScript counts in milliseconds, most other languages and protocols count seconds. new Date(1710000000) gives 20 January 1970 at 19:00:00 UTC. In Python 3.14, datetime.fromtimestamp(1710000000000, tz=timezone.utc) stops with "year must be in 1..9999, not 56157". Java has two methods, Instant.ofEpochSecond and Instant.ofEpochMilli, and nothing warns you if you pick the wrong one.
Date.now() to a function that expects seconds, or the result of time() to new Date()JSON.parse: 1710000000123456789 comes back as 1710000000123456800, because JavaScript numbers are exact only up to 9 007 199 254 740 991. Read the field as a string or a BigIntcreated_at_ms, expires_in_s) and in the API description, and test with a value you can read, such as the epoch of today at noon.RFC 7519 defines exp, nbf and iat as seconds since the epoch, with leap seconds ignored. A token signed with exp set to Date.now() + 3600000 carries milliseconds. With the jose library, version 6, such a token signed on 9 March 2024 still verified when the check date was set to 2034. Its exp of 1710003600000, read as seconds, is +056157-11-09T08:00:00.000Z. The converter hides the bug if you leave Unit on Auto, because it reads 13 digits as milliseconds and shows a normal date.
exp from a millisecond clock, as in Date.now() + 3600 * 1000exp into the converter with Unit on Auto, and concluding that the date is fineiat as seconds with exp as milliseconds in the same payload, so that the token seems to live foreverexp with Unit set to Seconds. A date in 2026 is correct. A date after the year 3000 is a bug.A date text without an offset names no moment until a zone is chosen. Python's datetime(2024, 3, 9, 16, 0, 0).timestamp() on a machine set to Paris gives 1709996400, not 1710000000. JavaScript reads 2024-03-09 as midnight UTC but 2024-03-09T00:00:00 as midnight local time, so two spellings of the same day differ by the offset of the machine.
1710000000 is already the 10th in TokyoZ on every date you exchange. Store the epoch or the UTC date, and apply a zone only when you display it.Europe goes back to winter time on Sunday 25 October 2026, at 01:00 UTC. In Paris, 03:00 becomes 02:00, so 02:30 happens twice: at 00:30 UTC (1792888200) and at 01:30 UTC (1792891800). With the browser set to Paris, the Local date/time field takes the first one. On 29 March 2026 the hour from 02:00 to 03:00 does not exist, and the field answers that it cannot parse 02:30. The epoch removes the doubt, because it names one moment.
An epoch is easy to store and easy to overflow. The limits below come from the width of the type that holds it.
2147483647, 19 January 2038 at 03:14:07 UTC. One second later it wraps to a date in 1901TIMESTAMP column for a date after 2038: the documentation gives '2038-01-19 03:14:07' UTC as its upper bound4294967295, and 4294967296 is 7 February 2106 at 06:28:16 UTC2147483647 and 4294967296 in the converter.Units, limits and other epochs at a glance
Check the documentation of the system that produced the number before you trust its digits.
Date.now() and getTime() return millisecondstime.time() returns seconds as a float, and time.time_ns() returns nanosecondsSystem.currentTimeMillis() returns milliseconds, and Instant.getEpochSecond() returns secondstime() returns seconds, and microtime(true) returns seconds as a floatdate +%s prints seconds. GNU date also prints milliseconds with date +%s%3Nexp, nbf and iat are always seconds, and RFC 7519 allows a fractionYou will spot these values quickly once you have seen them, and every one can be pasted into the converter.
0: 1 January 1970 at 00:00:00 UTC, the origin1000000000: 9 September 2001 at 01:46:40 UTC, the first epoch with 10 digits2147483647: 19 January 2038 at 03:14:07 UTC, the end of a signed 32-bit integer4294967296: 7 February 2106 at 06:28:16 UTC, one past an unsigned 32-bit integer9999999999: 20 November 2286 at 17:46:39 UTC, the last epoch with 10 digits8640000000000 seconds: 13 September 275760, the last date a JavaScript Date can hold. With Unit set to Seconds, the tool accepts it and refuses one second moreSome systems count from another origin or in another unit. If a date comes out decades off, look for one of these.
1710000000, FILETIME is 133544736000000000, which has 18 digits and is rejected by the converter1710000000 becomes 7316928001710000000 is 45360.67 (the fraction is the hour)The Unix timestamp converter, step by step
The Unix timestamp converter updates a short moment after you stop typing. There is no Convert button.
Look at the live clock
The block "Current Unix time" shows the epoch as Seconds and as Milliseconds, each with a Copy button. Pause stops the clock and Resume restarts it. Copy ISO (UTC) takes the current date.
Type or paste the epoch
Use the Unix epoch field. A badge such as "Inferred: seconds" shows how the digits were read. You can force Seconds or Milliseconds with the Unit option.
Read the Formats table
It lists the epoch as seconds and as milliseconds, ISO 8601, RFC 2822 and an SQL datetime. It adds a locale string in the language of the page and a relative time. RFC 2822 uses English day and month names. The relative row counts a month as 30 days and a year as 365, so it is a rough guide.
Copy the row you need
Each row has its own Copy button. A short message confirms what was copied.
The three fields stay in sync. The one you edit decides the others.
ISO / date text
Type 2024-03-09T16:00:00Z to get the epoch. The Unix epoch field fills with seconds, or with milliseconds if Unit is set to Milliseconds.
Local date/time
Use this field to enter a date on your own wall clock. It is never UTC, even when the table shows UTC, and a hint below the field says so.
Check the zone you meant
If the ISO text has no Z or offset, the browser applies its own zone. Add the offset when you want the result to be the same on every machine.
Two settings change how the page reads and shows a value.
Unit
Auto reads up to 10 digits as seconds and 11 to 15 digits as milliseconds. Seconds and Milliseconds force the reading. Use Seconds for the claims of a JWT.
Timezone
UTC is the default. Local uses the zone of your browser and changes the ISO, RFC 2822, SQL and locale rows. The epoch rows never change.
Load sample and Clear all
Load sample enters 1710000000. Clear all empties the fields and brings back the live clock.
When a value cannot be read, the tool says why and shows no date.
Could not parse this input
The text is neither a number nor a date that the browser understands. Rewrite the date as ISO 8601, for example 2024-03-09T16:00:00+00:00.
This value looks more precise than milliseconds
The number has 16 digits or more, as microseconds, nanoseconds or a FILETIME do. Remove the extra digits first.
The same conversions in JavaScript, Python, a shell and Java
JavaScript works in milliseconds. Multiply or divide by 1000 at the boundary with systems that use seconds, and give a zone to Intl.DateTimeFormat when you need a named one.
Basic example
Pass a time zone to every call. A naive datetime has none, and timestamp() then uses the zone of the machine.
Basic example
GNU date, found on Linux, and the BSD date of macOS do not take the same options.
Basic example
The java.time API keeps the unit in the method name, which makes a mix-up visible in a code review.
Basic example
Conclusion
An epoch names one moment, and almost every error comes from how it is read. Count the digits to tell seconds from milliseconds, write the offset on every date, and keep the zone for display. The Unix timestamp converter shows the same moment in the formats you need, in UTC or in your own zone. It reads one value at a time, offers no list of zones and rejects values of 16 digits or more. For a token, read its claims with the JWT decoder and paste exp with Unit set to Seconds. For a log, rewrite the date as ISO 8601 first. The developer utilities hub lists the related tools.
Convert a Unix timestamp in your browser
Related Articles

Paste a token and a JWKS to check an RS256, ES256 or HS256 signature in your browser. How kid picks the key, measured errors and the claims to check.

HTTP/2 and HTTP/3 change how files travel, not how big they are. Measured sizes, compile times and bundling tests show what minification still saves.

Read a cron expression field by field, check its next runs in UTC or local time and avoid traps with steps, time zones and dialects, all in your browser.