Timestamp Converter
Convert Unix timestamps ↔ dates both ways. Milliseconds and timezones supported.
Timestamp → Date
Date → Timestamp
What is Timestamp Converter?
Timestamp Converter turns Unix timestamps into readable dates and dates back into epoch values, free and instant in your browser. It auto-detects seconds or milliseconds and shows UTC, your local time zone, ISO 8601, and relative time — a quick epoch converter for developers checking logs and APIs.
Key features
- Auto-detects epoch seconds (10 digits) or milliseconds (13 digits)
- Shows UTC, local time, ISO 8601, and relative time
- Converts a picked date and time back to Unix seconds and milliseconds
- Now button fills both fields with the current moment
How to convert Unix timestamps to dates (and back)
A Unix timestamp is a single number: the count of seconds since midnight UTC on 1 January 1970, the "epoch." Logs, databases, JWTs, and API responses store time this way because a plain integer is unambiguous and easy to compare. The trouble is that 1704067200 means nothing at a glance. This Timestamp Converter turns that number into a date you can read — and back again — instantly and entirely in your browser.
Timestamp → Date
- Enter a Unix timestamp. The tool auto-detects the unit by digit count: a 10-digit value is read as seconds, a 13-digit value as milliseconds. This is the single most common source of "my date is in 1970 or in the year 54321" bugs — code that expects one unit and gets the other — and the auto-detection sidesteps it.
- You immediately get several views of the same instant:
- UTC — the canonical, time-zone-free reading.
- Your local time zone, using your device's setting.
- ISO 8601 (
2024-01-01T00:00:00.000Z), the format most APIs expect. - The value in both seconds and milliseconds, so you can copy whichever your code needs.
- A relative description like "2 hours ago" or "in 3 days" for a quick sanity check.
Showing UTC and local side by side is the point: a timestamp is an absolute moment, but the wall-clock date it maps to depends on the reader's zone. Seeing both at once is how you confirm an off-by-a-few-hours discrepancy is really just a time-zone offset, not a data error.
Date → Timestamp
- Use the date-time picker to choose a calendar date and time. It's interpreted in your local time zone, so the resulting epoch value reflects that moment where you are.
- Read off the Unix seconds, milliseconds, and ISO value to paste into a query, test fixture, or API call.
Common epoch gotchas
A few edge cases trip people up when reading raw timestamps:
- Seconds vs. milliseconds is the big one — JavaScript's
Date.now()returns milliseconds (13 digits), but most Unix tools, databases, and JWTexpclaims use seconds (10 digits). Paste a millisecond value into code expecting seconds and you land 50,000 years in the future. - Microseconds (16 digits) show up in some Python and database exports. This tool auto-detects only 10- and 13-digit inputs, so divide a microsecond value by 1000 before pasting it.
- Dates before 1970 are represented as negative timestamps, and the far-future year-2038 problem is why systems that still store time in a signed 32-bit integer break just after
2147483647. Both are real values a modern 64-bit converter handles without issue.
Tip
Click Now to fill both fields with the current moment. It's the fastest way to grab "right now" as an epoch value, and a handy baseline when you're eyeballing whether some other timestamp is in the recent past or the future. All of this is plain date math done locally — nothing you type is ever sent to a server.
Frequently asked questions
- How does it know whether my number is in seconds or milliseconds?
- It auto-detects by digit count: a 10-digit value is read as seconds and a 13-digit value as milliseconds. Mixing the two is the classic bug, since a millisecond value misread as seconds lands roughly 50,000 years in the future.
- Why does the result show both UTC and my local time?
- A timestamp is one absolute instant, but the wall-clock date it maps to depends on the reader's time zone. Seeing UTC and your local time side by side lets you confirm that a few-hours discrepancy is just a zone offset, not a data error.
- Which time zone does the Date to Timestamp picker use?
- The date and time you pick are interpreted in your device's local time zone, so the epoch value reflects that moment where you are. If you need a value anchored to UTC, account for your own offset accordingly.
- Can it handle microsecond timestamps with 16 digits?
- No. Auto-detection covers only 10-digit seconds and 13-digit milliseconds. Divide a microsecond value by 1000 before pasting it, or you will get a nonsensical far-future date.
- What is the fastest way to get the current timestamp?
- Click Now, which fills both fields with the present moment in seconds and milliseconds at once. It is also a handy baseline for eyeballing whether some other timestamp is in the recent past or the future.
- Does it work with dates before 1970?
- Yes. Those are represented as negative Unix timestamps, and the converter handles them like any other value. It also handles far-future dates past the 32-bit year-2038 limit, since it is not constrained to signed 32-bit integers.
Privacy
The conversion is simple date math done locally in your browser; no timestamp or date you enter is ever sent to a server.
