Epoch Converter
Paste a Unix timestamp, a date or a whole log. Get every time converted, in any time zone, exact to the nanosecond. Nothing leaves your browser.
- 0
- Timestamps
- 0
- Dates
- 0
- Errors
Unix time now
Paste a timestamp, a date or a whole log in the editor. Every time in it gets converted.
On this page
About Epoch Converter
Updated
Epoch Converter turns Unix timestamps into dates, and dates into Unix timestamps. Paste one value, a list, or a whole log or JSON file. The tool finds every timestamp and every date in it and converts each one, with the line it came from.
You never pick the unit: a 10-digit number is seconds, 13 digits milliseconds, 16 microseconds and 19 nanoseconds. A number that could be two units is converted and marked, with the other reading next to it. Nanoseconds stay exact to the last digit, where most converters cut them to milliseconds.
How to convert a Unix timestamp to a date
- Paste a timestamp, a date, or a log with times in it, or load a file. With the editor empty, the Result shows the time now. Buttons such as Start of today and End of today put a time in the editor.
- Press Convert (Alt C). Results lists each time found, what it was read as, the answer and how long ago it was. For a timestamp, it also shows your own time when your zone is not the one you picked.
- Set the time zone in the Result header. UTC is the default, so the answer is the same for everyone.
- Open Output for your text with each date added after its timestamp, ready to copy or download. In Options, Output switches to Replace.
- Open Details for one time in every form, or Discord for its chat codes. All forms under a row in Results opens that time.
- In Options: Unit to read every number as seconds, ms, µs or ns; Date format; Dates with no zone, read as UTC or in the zone above; and what unit a date becomes.
Seconds, milliseconds, microseconds, nanoseconds
The same moment, 2023-11-14 22:13:20.123456789 UTC, in each unit. The digit count tells them apart:
Unit Digits Value Used by
Seconds 10 1700000000 Unix, PHP, MySQL, most APIs
Milliseconds 13 1700000000123 JavaScript, Java, Kafka
Microseconds 16 1700000000123456 PostgreSQL, Python datetime
Nanoseconds 19 1700000000123456789 Go, Python time_ns, InfluxDBThese counts hold for dates from 2001 to 2286. Older dates have fewer digits: a timestamp from 1990 is 9 digits in seconds. Set Unit in Options when your numbers are from far in the past or future.
Dates the tool reads
2023-11-14T22:13:20Z ISO 8601 and RFC 3339, with Z or +01:00
2023-11-14 22:13:20.123 The same with a space; no zone means UTC
2023-11-14 A date alone is midnight
Tue, 14 Nov 2023 22:13:20 GMT RFC 2822 (email) and HTTP headers
14/Nov/2023:22:13:20 +0000 Apache and Nginx access logs
Tue Nov 14 22:13:20 2023 C asctime, Apache error logs, git log
2023-11-14 17:13 EST A zone name at the end, see below
1 March 2026 21:00 Day, month name and year
March 1, 2026 9:00 PM Month name first, with AM or PMA date can end in a zone name: an IANA name such as America/New_York, the same in brackets ([America/New_York]), or EST, EDT, CST, CDT, MST, MDT, PST, PDT, CET, CEST, BST, JST or GMT. The tool does not read IST, because it is the name of three zones.
The tool reads a date with no zone as UTC, the way most servers write logs. To read it in the chosen time zone, set Options, Dates with no zone, to In the zone above. The tool marks a time that does not exist there, because the clocks jumped forward. It also marks a time that happens twice, when the clocks go back.
The tool does not read dates such as 11/14/2023, because 03/04/2023 is March 4 in the US and April 3 in Europe. On a line of its own, such a date shows as an error. Among other words, the tool skips it. The tool also does not read syslog dates such as Nov 14 22:13:20, because they have no year.
A whole log at once
Paste a log, a CSV or a JSON file. In a line with other words, the tool takes dates by their form. It takes a number only if it has 10 to 19 digits and its date falls between 2001 and 2100. That keeps order numbers and IDs out. The Summary counts the numbers of that length that it left out. A 9-digit timestamp from the 1990s is skipped there: put it on a line of its own.
1700000000 [2023-11-14 22:13:20 UTC] INFO api started
1700000003412 [2023-11-14 22:13:23.412 UTC] INFO GET /orders 200
2023-11-14T22:13:27Z [1700000007] WARN queue is slowA 10-digit ID can still look like a timestamp. Results show each value with its line, so you can see what was taken.
The year 2038 problem
Old systems store Unix time in a signed 32-bit number. Its largest value, 2147483647, is 2038-01-19 03:14:07 UTC. One second later the number wraps to -2147483648, which is 1901-12-13. Details shows for each time whether it fits in 32 bits. Modern systems use 64 bits, which last for 292 billion years.
Common errors
A letter O in place of a zero
A letter O or a lowercase l looks like a digit, often in a value copied from a PDF or a chat. Some converters drop the letters and give a date in 1970 with no warning. This tool marks the letter.
17000000OO
This is the letter O, not the digit 0. With digits in place
of letters, 1700000000 is 2023-11-14 22:13:20 UTC.1700000000Day and month swapped
A date written year, day, month gives a month over 12.
2026-13-01
Months go from 01 to 12. If 13 is the day, the day and month
are swapped: write 2026-01-13.2026-01-13Milliseconds read as seconds
A 13-digit value read as seconds lands about 54,000 years from now. Read as seconds, 1700000000123 is in the year 55,840. Leave Unit on Auto. If you set it, the tool warns when the digits do not fit:
1700000000000 with Unit set to seconds
Read as seconds, as set, this is the year 55,840. By its 13 digits
it looks like milliseconds: 2023-11-14 22:13:20 UTC.Digit groups
1,700,000,000
A timestamp is written without separators. Remove the commas:
1700000000.1700000000In code
The time now, and a timestamp to a date in UTC, in common languages:
Language Now in seconds Timestamp to date
JavaScript Math.floor(Date.now() / 1000) new Date(1700000000 * 1000).toISOString()
Python int(time.time()) datetime.fromtimestamp(1700000000, timezone.utc)
PHP time() gmdate("Y-m-d H:i:s", 1700000000)
Java Instant.now().getEpochSecond() Instant.ofEpochSecond(1700000000)
C# DateTimeOffset.UtcNow.ToUnixTimeSeconds() DateTimeOffset.FromUnixTimeSeconds(1700000000)
Go time.Now().Unix() time.Unix(1700000000, 0).UTC()
PostgreSQL extract(epoch from now()) to_timestamp(1700000000)
MySQL UNIX_TIMESTAMP() FROM_UNIXTIME(1700000000)
Bash date +%s date -u -d @1700000000
Excel =(NOW()-DATE(1970,1,1))*86400 =A1/86400+DATE(1970,1,1)JavaScript counts in milliseconds, so divide by 1,000 to get seconds and multiply by 1,000 to go back. MySQL FROM_UNIXTIME and Excel NOW() use the local time zone of the server or the computer, not UTC. On macOS, date -u -r 1700000000 takes the place of -d @.
Epoch time resources
- POSIX: Seconds Since the EpochThe official definition of Unix time, with the formula that leaves leap seconds out.
- RFC 3339: Date and Time on the InternetThe strict form of ISO 8601 that JSON, APIs and logs use: 2023-11-14T22:13:20Z.
- IANA Time Zone DatabaseThe list of zones and their clock changes that every browser and server uses, this tool included.
- MDN: DateHow JavaScript stores a time as milliseconds since 1970, and why Date.now() has 13 digits.
- Year 2038 problem on WikipediaWhy a signed 32-bit timestamp ends on 2038-01-19 at 03:14:07 UTC, and what breaks.
- Discord: Message FormattingThe <t:seconds:style> codes and the seven styles, from Discord's own documentation.
Epoch time FAQ
What is epoch time?
Epoch time, also called Unix time or a Unix timestamp, counts the seconds since 1970-01-01 00:00:00 UTC. That moment is the epoch. So 0 is the start of 1970, 1700000000 is 2023-11-14 22:13:20 UTC, and -1 is one second before 1970.
Computers store time this way because one number is easy to sort, compare and subtract. The count leaves out leap seconds, so every day is exactly 86,400 seconds.
How is a Unix timestamp calculated?
Count the whole days since 1970-01-01, multiply by 86,400, and add the seconds since midnight UTC. For 2023-11-14 22:13:20 UTC, the day is 19,675 days after the epoch: 19,675 × 86,400 = 1,699,920,000. The time of day is 22 × 3,600 + 13 × 60 + 20 = 80,000 seconds. The sum is 1700000000.
Is a Unix timestamp in seconds or milliseconds?
Unix time is in seconds, but many systems use smaller units. Count the digits: a timestamp for today's date has 10 digits in seconds, 13 in milliseconds (JavaScript, Java), 16 in microseconds and 19 in nanoseconds (Go, Python time_ns). This tool reads the unit from the digits. To go from seconds to milliseconds, multiply by 1,000: 1700000000 becomes 1700000000000.
How do I convert a date to a Unix timestamp?
Paste the date, for example 2023-11-14 22:13:20, and press Convert. The answer is the timestamp: 1700000000. The tool reads a date with no zone as UTC. For another zone, add the offset, for example +01:00. In Options, Dates become sets the unit: seconds, ms, µs or ns.
Is epoch time always UTC?
Yes. A Unix timestamp is the same number everywhere on Earth at the same moment. Time zones only matter when you write it as a date: 1700000000 is 22:13 in London and 17:13 in New York. Choose the zone in the Result header; your own zone is in the list.
How do I convert epoch time to my local time, EST or Pacific time?
Paste the timestamp and set the time zone in the Result header: Your time zone, America/New York for Eastern time or America/Los Angeles for Pacific time. The tool uses the real clock changes for each date. A summer date in New York shows -04:00 (EDT) and a winter date -05:00 (EST). The Long date format spells out EDT or EST. For a timestamp, Results also show your own time under the answer when your zone is not the one you picked.
To read a date as New York time, end it with the zone: 2026-03-01 09:00 EST or 2026-03-01 09:00 America/New_York.
What is the epoch time right now?
The tool shows it at the top of the Result while the editor is empty, ticking each second, in seconds and milliseconds, with copy buttons. With text in the editor, the Now view in Results shows the same clock. In code, Math.floor(Date.now() / 1000) in JavaScript or int(time.time()) in Python gives the same number.
How do I convert a Unix timestamp in Excel or Google Sheets?
Excel counts days since 1900, not seconds since 1970. For a timestamp in seconds in A1, use =A1/86400+DATE(1970,1,1) and format the cell as a date and time. For milliseconds, divide by 86400000. The way back is =(A1-DATE(1970,1,1))*86400. The result is in UTC; add or subtract hours for your zone, for example +1/24 for UTC+1.
How do I make a Discord timestamp?
Discord shows a time in each reader's own zone when you write <t:1700000000:F> in a message. The number is a Unix timestamp in seconds, and the letter is the style.
Paste the date with its offset, for example 2026-12-24 18:00 +01:00 for 18:00 in Central Europe, and open Discord. Or paste 2026-12-24 18:00 and set Options, Dates with no zone, to In the zone above. Without one of the two, the tool reads the date as UTC. Discord gives all seven codes, with how each one shows, ready to copy.
Are my timestamps sent anywhere?
No. The conversion runs in your browser, in JavaScript on this page. Your timestamps, dates and logs are never uploaded, stored or logged. You can load the page, go offline, and it still works.