Timestamp Converter
Unix time in seconds, milliseconds, microseconds or nanoseconds (told apart by length), or a date, shown as Unix time, ISO 8601, local time, UTC and how long ago; also Windows FILETIME, .NET ticks, Chrome, NTP, GPS, HFS+, FAT, Apple Cocoa, Excel and Julian Day times, and the times inside ULIDs, ObjectIds, Firebase push IDs, Bluesky TIDs and Snowflake IDs; the first and last second of a day, week, month, quarter or year; a list of timestamps at once; code for Unix time in a dozen languages; and durations between seconds, SCORM 1.2 time and ISO 8601 (SCORM 2004, xAPI, cmi5).
About this tool What it's for, how to use it and an example
What it's for
Turn a Unix timestamp into a readable date, or a date into a timestamp. Timestamps (seconds since 1 January 1970) appear in logs, databases, APIs and JWTs.
For example, when a log line or API response contains 1700000000 and you need to know when that actually was.
How to use it
Type or paste a timestamp in seconds, milliseconds, microseconds or nanoseconds, and the tool works out which from its length. Or type a date, such as 2026-10-01T12:00:00Z. You get Unix seconds and milliseconds, ISO 8601 in UTC, your local time, UTC and how long ago it was, each with a Copy button. Now fills in the current time.
The same moment is also given as a Windows FILETIME (also used for LDAP and Active Directory times), an Apple Cocoa or Core Data time and an Excel serial date. To read one of those, or the time inside an X (Twitter) or Discord Snowflake ID, choose it under Read as. A ULID or a MongoDB ObjectId is recognised by its shape, and the time it was made is shown.
Read as also covers .NET ticks, Chrome / WebKit time, NTP, GPS, HFS+, FAT / DOS, Julian Day and Modified Julian Day (all shown for the same moment too), and the time inside a Firebase push ID or a Bluesky TID (a 13-character ID, recognised by its shape). Start and end of a period gives the first and last second of the day, ISO week (Monday first), month, quarter or year around a date, in UTC or your local time. Many timestamps at once converts one per line, using the Read as setting, and copies the result as CSV. Unix time in code at the bottom lists how to get and convert Unix time in a dozen languages.
Durations converts a length of time between seconds, SCORM 1.2’s HHHH:MM:SS.SS (used by cmi.core.session_time and cmi.core.total_time) and an ISO 8601 duration such as PT1H2M3.5S (used by SCORM 2004’s cmi.session_time, xAPI’s result.duration and cmi5), and says it in words.
Example
Type this:
1700000000
The tool reads it as seconds: 2023-11-14T22:13:20.000Z, which is Tuesday, 14 November 2023 at 22:13:20 UTC.
Under Durations, type PT1H2M3.5S: it’s 3723.5 seconds, 0001:02:03.50 in SCORM 1.2 time, and 1 h 2 min 3.5 s.
Good to know
Units are guessed from the number of digits, so a timestamp from very early 1970 could be misread; the tool says which unit it used. A date and time without a time zone is read as your local time, but a date on its own, such as 2026-10-01, is read as midnight UTC. Excel serial dates count days from 30 December 1899, which matches Excel for dates from March 1900 on (Excel counts a 29 February 1900 that never was); the old Mac 1904 system isn’t supported.
NTP time counts from 1900 and is read as era 0 (it wraps in 2036). GPS time is converted with 18 leap seconds, which is right since 2017 but will change if another is added. FAT times are local, in 2-second steps, between 1980 and 2107; give them as hex (0x58216000) or decimal. A Firebase push ID or TID only holds a time, so they can’t be made here. Batch lines that can’t be read say “Not read”. The code snippets are examples, not tested against every version of each language.
Durations keep two decimal places of a second, as SCORM does. In an ISO 8601 duration, years count as 365 days and months as 30, since their real length depends on the date they start from.
Guides: What's inside this JWT? · Why won't my course work in the LMS? · Reading a crash or a log · What time is this number? Timestamps in logs and IDs
Start and end of a period
Many timestamps at once
| Input | Unix seconds | ISO 8601 (UTC) |
|---|
Durations
Unix time in code
The current Unix time in seconds, and 1700000000 (2023-11-14T22:13:20Z) converted to and from a date, in some common languages. The date forms use UTC; check each language’s documentation before relying on a snippet.
| Language | Now (seconds) | Seconds to a date | Date to seconds |
|---|---|---|---|
| JavaScript | Math.floor(Date.now() / 1000) | new Date(1700000000 * 1000).toISOString() | Math.floor(Date.parse('2023-11-14T22:13:20Z') / 1000) |
| Python | int(time.time()) | datetime.fromtimestamp(1700000000, timezone.utc) | int(datetime(2023, 11, 14, 22, 13, 20, tzinfo=timezone.utc).timestamp()) |
| Go | time.Now().Unix() | time.Unix(1700000000, 0).UTC() | time.Date(2023, 11, 14, 22, 13, 20, 0, time.UTC).Unix() |
| Rust | SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs() | DateTime::from_timestamp(1700000000, 0) (chrono) | Utc.with_ymd_and_hms(2023, 11, 14, 22, 13, 20).unwrap().timestamp() (chrono) |
| Java | Instant.now().getEpochSecond() | Instant.ofEpochSecond(1700000000L) | Instant.parse("2023-11-14T22:13:20Z").getEpochSecond() |
| C# | DateTimeOffset.UtcNow.ToUnixTimeSeconds() | DateTimeOffset.FromUnixTimeSeconds(1700000000) | new DateTimeOffset(2023, 11, 14, 22, 13, 20, TimeSpan.Zero).ToUnixTimeSeconds() |
| PHP | time() | gmdate('c', 1700000000) | strtotime('2023-11-14T22:13:20Z') |
| Ruby | Time.now.to_i | Time.at(1700000000).utc | Time.utc(2023, 11, 14, 22, 13, 20).to_i |
| Swift | Int(Date().timeIntervalSince1970) | Date(timeIntervalSince1970: 1700000000) | ISO8601DateFormatter().date(from: "2023-11-14T22:13:20Z")!.timeIntervalSince1970 |
| PostgreSQL | extract(epoch from now())::bigint | to_timestamp(1700000000) | extract(epoch from timestamptz '2023-11-14 22:13:20+00')::bigint |
| MySQL | UNIX_TIMESTAMP() | FROM_UNIXTIME(1700000000) | UNIX_TIMESTAMP('2023-11-14 22:13:20') (read in the session time zone) |
| SQLite | strftime('%s', 'now') | datetime(1700000000, 'unixepoch') | strftime('%s', '2023-11-14 22:13:20') |
| Shell (GNU date) | date +%s | date -u -d @1700000000 | date -u -d '2023-11-14 22:13:20' +%s |
| Shell (macOS date) | date +%s | date -u -r 1700000000 | date -u -j -f '%Y-%m-%d %H:%M:%S' '2023-11-14 22:13:20' +%s |
| PowerShell | [DateTimeOffset]::UtcNow.ToUnixTimeSeconds() | [DateTimeOffset]::FromUnixTimeSeconds(1700000000) | [DateTimeOffset]::Parse('2023-11-14T22:13:20Z').ToUnixTimeSeconds() |
Built with The third-party code and data this tool uses, and their licences
This tool uses no third-party code or data of its own: its code was written for this site.
Every page also uses Montserrat (SIL Open Font License 1.1).
Everything the site uses is on Credits and licences.
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.