Unix Timestamp Converter
Turn Unix epoch timestamps into readable local and UTC dates, and convert any date and time back into epoch seconds and milliseconds — all in your browser.
Timestamp → Date
Seconds or milliseconds are detected automatically.
Date → Timestamp
How to Convert a Unix Timestamp
A Unix timestamp is the number of seconds or milliseconds that have passed since 1 January 1970 at 00:00:00 UTC, a moment known as the Unix epoch. Turning that number into a readable date by hand is slow and easy to get wrong, so this converter does it both ways without sending anything to a server. Follow these steps.
Paste a timestamp. Type or paste the number into the Unix timestamp field. The tool accepts positive values (dates after 1970) and negative values (dates before 1970), and it works out automatically whether your number is expressed in seconds or in milliseconds by looking at how many digits it has.
Press Convert. The result panel shows the same instant in three forms: your local time with the time zone name, Coordinated Universal Time (UTC), and the ISO 8601 string used by databases and APIs. The detected unit is displayed so you always know how the number was interpreted.
Convert a date back to a timestamp. In the Date to timestamp panel, open the date and time picker, choose a day and time, and press Convert. The tool returns the matching Unix seconds, the Unix milliseconds, and the equivalent UTC text.
Use the current time shortcut. Press Use current time to fill the field with the present moment, which is convenient when you want to compare a log entry against now.
Copy any value. Every result has its own Copy button that puts the exact string on your clipboard, ready to paste into code, a database query, or a configuration file.
Everything is calculated locally in your browser, so the conversion is instant and private.
What Is a Unix Timestamp?
A Unix timestamp, also called an epoch time or POSIX time, is a single integer that identifies an instant by counting how many seconds have elapsed since the Unix epoch: 1 January 1970 at 00:00:00 UTC. Because it is just a number, it is compact, unambiguous, and easy to compare, which is why operating systems, databases, log files, and APIs rely on it so heavily. Two machines on opposite sides of the world that record the same timestamp are recording the same moment, no matter how their local clocks and time zones are configured. The classic Unix timestamp counts seconds, which is enough precision for most human events. Modern systems, however, frequently use milliseconds because JavaScript's Date object and many web APIs measure time this way. A 13-digit number is almost always milliseconds, while a 10-digit number is almost always seconds, and this tool uses that pattern to detect the unit automatically. When in doubt you can also look at the magnitude: the current epoch value is around 1.7 billion seconds, or 1.7 trillion milliseconds. One subtlety worth remembering is that a timestamp is always UTC. The number itself carries no time zone, so the same value is displayed differently depending on where the reader is. That is exactly why this converter shows both your local time, adjusted for your device's time zone, and the UTC value. The ISO 8601 output, such as 2024-01-01T12:00:00.000Z, is the canonical machine-readable form, and the trailing Z confirms that it is UTC. JavaScript's Date can represent roughly the years 271821 BCE to 275760 CE, so extreme values outside that window are rejected with a clear message instead of producing a misleading date.
Common Applications
1. Reading logs and error reports: server logs and monitoring tools usually store times as epoch numbers. Paste one into the converter to see immediately which event, day, and time zone it refers to.
2. Debugging APIs: JSON payloads often contain fields such as "created_at": 1700000000 or a millisecond value. Converting them makes it obvious whether an expiry has passed or a record was written when you expected.
3. Writing database queries: when you filter by date, you frequently need a timestamp literal. Choosing a date in the reverse panel returns both seconds and milliseconds so the value matches the column you are querying.
4. Reproducing bug reports: a user reports that something broke "at this time". Converting their timestamp to your local time helps you line it up with your own testing and deployments.
5. Scheduling and cache control: cache headers, token lifetimes, and scheduled jobs are defined in seconds or milliseconds from now. Converting the target moment helps you check that a value is sane before shipping it.
6. Auditing data migration: when data moves between systems that disagree about seconds and milliseconds, comparing both outputs against a known date quickly reveals a 1000x error.
Seconds vs Milliseconds
A seconds timestamp for a recent date has ten digits (for example 1700000000), while the same moment in milliseconds has thirteen (1700000000000). This tool treats a number whose absolute value is 100 billion or more as milliseconds and anything smaller as seconds, which matches the practical range of dates people convert. If a value is ambiguous, the detected unit is always shown, so you can confirm the interpretation before you trust the result. Multiplying a milliseconds value that was actually in seconds by 1000, or dividing when you should not have, is the single most common timestamp mistake.
Why Is the Epoch 1 January 1970?
The Unix operating system, developed at Bell Labs, needed a simple, universal reference point for time. Its designers chose 00:00:00 UTC on 1 January 1970 because it was a recent, round date that simplified the arithmetic. The convention stuck and spread far beyond Unix into Linux, macOS, Windows APIs, the Java and JavaScript standard libraries, and countless databases and protocols. Knowing the epoch also lets you sanity-check a value: anything near 1.7 billion seconds is happening right now in the 2020s, whereas much smaller numbers point to earlier decades and much larger ones to the distant future.
Related Utilities
- JSON Formatter & Validator — Free JSON Beautifier
- Base64 Encoder & Decoder — Online Converter
- Password Generator — Strong Random Passwords
- URL Encoder & Decoder — Free Percent-Encoding Tool
- UUID Generator — Generate Random UUID v4 Online
- Remove Duplicate Lines — Online Line Remover
Guides
Frequently Asked Questions - FAQ
Is my data sent to a server?
No. Every calculation happens in your browser with JavaScript's built-in Date object. Nothing you enter is uploaded, logged, or stored anywhere.
How does the tool know if my timestamp is in seconds or milliseconds?
It looks at the size of the number. A recent date has about ten digits in seconds and thirteen in milliseconds, so values with an absolute value of 100 billion or more are treated as milliseconds. The detected unit is always displayed so you can verify it.
Why does the local time differ from the UTC time?
A timestamp is always stored in UTC and carries no time zone. The local value is adjusted for your device's time zone and daylight-saving rules, so it can differ from UTC by several hours. The UTC line shows the raw, universal value.
Can I convert dates before 1970?
Yes. The Unix epoch is simply zero, so any earlier date is a negative number. Enter a negative timestamp to see dates before 1 January 1970, and the reverse converter also returns negative values for such dates.
What happens if my timestamp is out of range?
JavaScript's Date can only represent roughly the years 271821 BCE to 275760 CE. Values outside that window would produce an invalid date, so the tool rejects them and shows an explanatory message instead of a wrong result.
Last updated: