What is a Unix timestamp?
A Unix timestamp is the number of seconds since 1 January 1970, 00:00:00 UTC — the "Unix epoch". For example, 1700000000 means 14 November 2023, 22:13:20 UTC. Developers, databases and APIs use timestamps because one number works in every timezone: the same moment is the same number everywhere on Earth, and only the way it is displayed changes. It is also easy for a computer to compare and sort — a bigger number is simply a later moment. Our Unix Timestamp Converter shows the live timestamp right now and converts in both directions.
Seconds vs milliseconds
Timestamps come in two sizes, and mixing them up is the most common mistake. A timestamp in seconds is 10 digits — 1700000000 — while a timestamp in milliseconds is 13 digits — 1700000000000. JavaScript uses milliseconds; most databases, APIs and Unix systems use seconds. If your date converts to the year 1970 or the year 56000, you have the wrong unit: divide a 13-digit number by 1,000 to get seconds, or multiply a 10-digit number by 1,000 to get milliseconds. The converter shows both, so you can copy the one your system needs.
UTC vs local time
A timestamp itself has no timezone — it is one absolute moment. The difference is only in how it is written: the same timestamp is 22:13:20 in UTC and 03:13:20 the next day in Pakistan (UTC+5). That is why the converter shows every result twice: once in UTC and once in your own local time. When you schedule something across timezones — a meeting, a post, a server task — store the timestamp, not the local time, and convert it for display. Storing local time is how meetings end up an hour off after daylight saving changes.
How to convert a timestamp
Paste the timestamp into the converter and it shows the date and time instantly, in UTC and in your local time, plus how long ago (or how far ahead) that moment is. If you have a 13-digit number, use the milliseconds option; if it is 10 digits, use seconds. You can also see the current timestamp ticking live at the top of the page — copy it in seconds or milliseconds whenever you need "right now" as a number.
How to convert a date to a timestamp
Pick a date and time in the "Date to timestamp" section and the converter gives you the timestamp in seconds and milliseconds. This is how you turn a deadline — "1 January 2027, 00:00" — into the number a database or an API expects. Check the timezone: the converter uses your local time by default, so a date entered as midnight in Pakistan is 19:00 UTC the day before. For a UTC timestamp, enter the time five hours earlier, or use the UTC display to check.
Where timestamps appear
You meet timestamps in database rows (created_at, updated_at), in API responses, in log files (every line stamped with the moment it happened), in JSON data, in file metadata, and in scheduled tasks. When a website shows "posted 2 hours ago", it is showing a timestamp converted to a relative time. When an app sorts your messages newest first, it is sorting timestamps. Learning to read one — even roughly, by recognising that 1700000000 is late 2023 — makes debugging and reading logs much faster.
Common mistakes
- Mixing seconds and milliseconds. A 13-digit number used as seconds gives a year in the far future.
- Forgetting the timezone. A timestamp is absolute; the displayed time depends on where you are.
- Storing local time in a database — it breaks across timezones and daylight saving changes.
- Using a timestamp for a date only. A timestamp includes a time; midnight local time is not midnight UTC.