Unix Timestamp Converter Widget
Embed a Unix timestamp converter with a live epoch clock. Readers convert a timestamp to UTC and local time - the widget recognises seconds, milliseconds, microseconds and nanoseconds - or turn a date and time back into a timestamp.
Live preview
Exactly what your visitors will seeUnder the widget on your page: Powered by A2Z Tools
Embed code
<iframe src="https://a2z.tools/embed/w/unix-timestamp-converter" title="Unix Timestamp Converter by A2Z Tools" width="100%" height="940" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>
A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.
<div data-a2z-widget="unix-timestamp-converter" data-height="940"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
Works with
How it works
The top card shows the current Unix time and updates every second (paused when the frame is hidden). For conversion, the unit is detected from the number of digits: up to 11 digits is seconds, 12-14 milliseconds, 15-16 microseconds and 17-19 nanoseconds, which reads every date from 1973 to 5138 as intended; the reader can force a unit. Long nanosecond values are divided with BigInt so no digits are lost first. The result is shown in ISO 8601 UTC, in the visitor's local zone and as a relative phrase. Going the other way, a date and time in local time or UTC gives seconds and milliseconds; a local time that is skipped by a daylight-saving jump is flagged.
Method
- Unix time = seconds since 1970-01-01T00:00:00Z, ignoring leap seconds (POSIX)
- Digits in the integer part: <=11 seconds, 12-14 ms, 15-16 us, 17-19 ns
- ms = value x 1000 (s), value (ms), floor(value / 1000) (us), floor(value / 1,000,000) (ns)
- Valid range: +/-8.64e15 ms (about 271,821 BC to 275,760 AD)
- UTC output: ISO 8601 extended format with milliseconds and Z (RFC 3339 profile); local output uses the browser's IANA time zone, daylight saving included
Limitations
- Local time is always the visitor's own zone; the widget does not convert to a third, chosen time zone.
- Leap seconds are not represented, as in POSIX: 2016-12-31T23:59:60Z cannot be entered or shown.
- Unit detection by digit count assumes dates after 1973; a small seconds value meant as milliseconds (for example 86400000) must be forced to ms by hand.
- Precision stops at the millisecond: fractions finer than 1 ms are rounded to the nearest millisecond and a note says so.
Where publishers use it
- Backend and database docs where timestamps appear in logs and API responses
- Debugging articles about time zones and daylight-saving bugs
- Data-engineering guides that mix second and millisecond epochs
- Blog posts about the year-2038 problem
Questions
Is the timestamp in seconds or milliseconds?
Unix tools and most databases use seconds; JavaScript, Java and many APIs use milliseconds. The widget detects which from the length and shows how it read the number.
Does Unix time include time zones?
No. A Unix timestamp is the same everywhere; only its display in local time depends on the zone.
What happens in 2038?
Signed 32-bit timestamps overflow at 2147483647 (2038-01-19 03:14:07 UTC). This widget uses 64-bit values and is not affected.
Are leap seconds counted?
No. Like POSIX time, every day is treated as exactly 86,400 seconds.
Sources
- POSIX.1-2024 Base Definitions, section 4.19 Seconds Since the Epoch - The Open Group / IEEE . Definition of Unix time: 86,400 seconds per day, leap seconds not counted
- RFC 3339: Date and Time on the Internet: Timestamps - IETF . Profile of ISO 8601 used for the UTC output
- IANA Time Zone Database - IANA . Zone and daylight-saving rules the browser applies to local times
Cite or recommend this tool
If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.
A2Z Tools Unix Timestamp Converter https://a2z.tools/unix-timestamp-converter
<a href="https://a2z.tools/unix-timestamp-converter">A2Z Tools Unix Timestamp Converter</a>
[A2Z Tools Unix Timestamp Converter](https://a2z.tools/unix-timestamp-converter)
Unix Timestamp Converter by A2Z Tools - https://a2z.tools/unix-timestamp-converter
Related widgets
-
Turn a cron schedule into plain English and list its next five run times.
-
Read a JSON Web Token's header and claims, with exp, nbf and iat shown as dates.
-
Generate 1 to 100 random v4 or time-ordered v7 UUIDs in several formats.
-
Pretty-print, minify or validate JSON, with the line and column of the first syntax error.
-
Convert a JSON array of objects to CSV and CSV back to JSON, with RFC 4180 quoting.
-
Encode text to Base64 or decode it, with proper UTF-8 and an optional URL-safe alphabet.