Free tool
Unix Timestamp Converter
Convert Unix timestamps in seconds, milliseconds, microseconds or nanoseconds to UTC, local and time-zone dates, and back. Includes ISO 8601 and the current time.
Current Unix time
… seconds… milliseconds
Timestamp to date
Date to timestamp
Runs entirely in your browser. Nothing you type or upload is sent to our servers.
How to use the Unix timestamp converter
- Paste a timestamp. The unit (seconds, milliseconds, microseconds or nanoseconds) is detected from its size, and you can override it.
- Read the date in ISO 8601, in UTC, and in your chosen time zone, with the UTC offset that applied on that day.
- To go the other way, type a date and time in the second box. Pick a time zone, or end the text with
Zor an offset like+02:00.
Worked example
The millisecond timestamp 1700000000123 has 13 digits, so it is read as milliseconds. In UTC it is 2023-11-14T22:13:20.123Z. In New York, which was on standard time (UTC-05:00) on that date, the same instant reads 2023-11-14T17:13:20.123-05:00. Converted to other units it is 1700000000 seconds, 1700000000123 milliseconds, 1700000000123000 microseconds or 1700000000123000000 nanoseconds. Dividing the milliseconds by 1,000 and dropping the fraction gives the seconds value.
Well-known timestamps
| Moment | Seconds | UTC date and time |
|---|---|---|
| The Unix epoch | 0 | 1970-01-01T00:00:00Z |
| One billion seconds | 1,000,000,000 | 2001-09-09T01:46:40Z |
| 1,700,000,000 seconds | 1,700,000,000 | 2023-11-14T22:13:20Z |
| Two billion seconds | 2,000,000,000 | 2033-05-18T03:33:20Z |
| The 32-bit signed limit (2^31 - 1) | 2,147,483,647 | 2038-01-19T03:14:07Z |
Get or convert a timestamp in code
| Language | Current timestamp (seconds) | Timestamp to UTC date |
|---|---|---|
| JavaScript | Math.floor(Date.now() / 1000) | new Date(1700000000 * 1000).toISOString() |
| Python | int(time.time()) | datetime.fromtimestamp(1700000000, tz=timezone.utc) |
| PHP | time() | gmdate('c', 1700000000) |
| Go | time.Now().Unix() | time.Unix(1700000000, 0).UTC() |
| MySQL | SELECT UNIX_TIMESTAMP(); | SELECT FROM_UNIXTIME(1700000000); |
| PostgreSQL | SELECT EXTRACT(EPOCH FROM now()); | SELECT to_timestamp(1700000000); |
| Bash (GNU date) | date +%s | date -u -d @1700000000 |
JavaScript's Date.now() returns milliseconds, which is why a 13-digit value usually comes from JavaScript or Java and a 10-digit value from Unix tools, PHP, Python's time.time() or databases.
Common pitfalls
- Mixing up seconds and milliseconds. A seconds value read as milliseconds lands in January 1970; a milliseconds value read as seconds lands tens of thousands of years away.
- Local time instead of UTC. Store and send UTC timestamps, and convert to a time zone only when displaying.
- 32-bit overflow. Values above 2,147,483,647 (19 January 2038) do not fit a signed 32-bit integer.
- Floating-point rounding. Nanosecond values exceed what a JavaScript number can hold exactly, so treat them as strings or BigInt. This tool does the arithmetic with exact integers.
Working with API responses? Format them with the JSON formatter first, or turn them into a spreadsheet with JSON to CSV.
Frequently asked questions
What is a Unix timestamp?
It is the number of seconds that have passed since 00:00:00 UTC on 1 January 1970, a moment called the Unix epoch. Because it is a single number that does not depend on a time zone, computers use it to store and compare moments in time. Leap seconds are not counted, so every day is exactly 86,400 seconds long.
How does the tool tell seconds from milliseconds?
By size. Numbers below 100 billion are read as seconds, which covers dates up to the year 5138. Numbers up to 100 trillion are milliseconds, up to 100 quadrillion microseconds, and larger ones nanoseconds. Current timestamps are about 10 digits in seconds and 13 in milliseconds. You can override the guess with the unit menu.
Why is my converted time different from what I expected?
Almost always because of the time zone. A timestamp names one exact moment, but the clock reading for it depends on where you are. Check whether you are reading the UTC row or a local one, and whether daylight saving time applied on that date. The tool shows the offset used, such as UTC-05:00, so you can verify it.
Can a timestamp be negative?
Yes. Negative values are moments before 1970. For example, -86400 is 31 December 1969 at 00:00:00 UTC, exactly one day before the epoch. The tool accepts them and shows the date, as long as the result is within the range browsers support, roughly 270,000 years either side of 1970.
What is the Year 2038 problem?
Older systems store the timestamp in a signed 32-bit integer, whose largest value is 2,147,483,647. That is 03:14:07 UTC on 19 January 2038. One second later the number overflows and wraps to a negative value, which is read as 1901. Modern systems use 64-bit integers and are not affected, but old embedded devices and file formats can be.
What time zone names can I use?
Any IANA name your browser knows, such as America/New_York, Europe/London, Asia/Kolkata or Australia/Sydney. Start typing in the time zone box to see matches. Daylight saving rules come from your browser's own time zone database, so historical and future offsets follow the rules it has.
How do I convert a date to a timestamp?
Type the date and time in the second box, for example 2026-11-28 14:30:00, and choose the time zone it is in. You can add Z or an offset such as +02:00 to the text to override the zone. The result appears in seconds, milliseconds, microseconds and nanoseconds, each with a copy button.
Is anything sent to a server?
No. All conversion happens in your browser using JavaScript and its built-in Intl time zone support. Nothing you type is uploaded, logged or stored, and the live clock is just your own device clock. The page works offline once it has loaded.
Link to this tool
Found it useful? Copy a link for your page, newsletter or documentation.
Get new tools and guides by email
Optional. The tool above works without signing up.
More free tools
Browse all developer tools or the full list of free tools.
- Binary, Decimal & Hex Converter with Number to WordsConvert whole numbers between binary, octal, decimal and hexadecimal exactly, even for very large values, and spell any number out in words.
- Hash Generator: MD5, SHA-1, SHA-256, SHA-512 & HMACGenerate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes and HMACs for text or files in your browser. Nothing is uploaded, so private data stays private.
- Base64 Encode & Decode (UTF-8, URL-Safe, Files)Encode and decode Base64 with UTF-8 support and a URL-safe option, or turn a file into a Base64 data URI. Runs in your browser; nothing is uploaded.
- Morse Code TranslatorTranslate text to Morse code and Morse to text, play it as sound at an adjustable speed, or show it as a flashing light. Runs in your browser.
- Unit ConverterConvert length, weight, temperature, volume, area, speed and data size with exact factors, such as 1 inch = 2.54 cm. Includes inches to cm and kg to lbs.
- HEIC to JPG ConverterConvert iPhone HEIC photos to JPG in your browser with quality control. Works where your browser can open HEIC. Your photos are never uploaded.