Timestamp Converter
Convert Unix epoch seconds or milliseconds to ISO 8601 dates — and back. Live UTC clock ticks in real time.
Conversion input (JSON)
Converted timestamp
Timestamp result
What is a Unix timestamp?
A Unix timestamp is a single integer representing the number of seconds (or milliseconds) elapsed since the Unix epoch: 00:00:00 UTC on Thursday, 1 January 1970. Every operating system, database, and programming language understands it, regardless of locale or timezone. Timestamps sort naturally in chronological order and require no special parsing — they are just numbers.
Seconds vs milliseconds — the most common confusion
| Unit | Digit count (2024) | Who uses it |
|---|---|---|
| Seconds | 10 digits (~1 700 000 000) | Unix/Linux, POSIX, Python time.time(), Go time.Unix(), most SQL databases, JWT exp |
| Milliseconds | 13 digits (~1 700 000 000 000) | JavaScript Date.now(), Java System.currentTimeMillis(), most REST APIs, MongoDB, Redis |
Treating a millisecond timestamp as seconds gives you a date in the year 57,000. Treating a seconds timestamp as milliseconds gives you a date in early January 1970. Both are extremely common bugs.
How to use this tool
- Click Use current time to pre-fill with the live Unix timestamp, or enter your own value.
- Use
{ "unixTimestamp": 1700000000 }to convert seconds-to-date. - Use
{ "date": "2024-01-15T09:30:00Z" }to convert date-to-seconds. - Click Convert to see the result in ISO 8601 and other formats.
ISO 8601 — the unambiguous text format
ISO 8601 represents dates and times as YYYY-MM-DDTHH:mm:ssZ (UTC) or YYYY-MM-DDTHH:mm:ss+HH:mm (offset). ISO 8601 strings sort correctly as plain strings, are locale-independent, and are the recommended format for all date values in JSON APIs and log files.
The Year 2038 problem (Y2K38)
A 32-bit signed integer can store values up to 2,147,483,647 — corresponding to 03:14:07 UTC on 19 January 2038. Systems storing Unix timestamps in a 32-bit integer will overflow at that moment. Most modern systems use 64-bit timestamps. If you maintain legacy embedded systems or 32-bit database columns, audit your timestamp storage before 2038.
Timezone handling
Unix timestamps are always UTC. Converting to a local time is always a client-side display operation — the number itself is UTC. When building date pickers, always store the UTC timestamp and convert to local timezone in the UI layer only. Storing "local time" in a timestamp column is a design error that causes bugs at DST transitions and when users change timezone.
Native code equivalents
Production-ready snippets — same logic the tool runs, in your language// JavaScript uses milliseconds; Unix timestamps are seconds.
const nowUnix = Math.floor(Date.now() / 1000); // seconds
// Unix seconds -> Date
function unixToDate(unix) {
return new Date(unix * 1000);
}
// Date -> Unix seconds
function dateToUnix(date) {
return Math.floor(date.getTime() / 1000);
}
// ISO 8601 -> Unix seconds
function isoToUnix(isoString) {
return Math.floor(new Date(isoString).getTime() / 1000);
}
console.log(unixToDate(1700000000).toISOString()); // "2023-11-14T22:13:20.000Z"
console.log(isoToUnix('2024-01-15T09:30:00Z')); // 1705311000