Timestamp Converter
Convert a Unix timestamp to a readable date (local time and UTC), or a date back to a timestamp.
Timestamp → Date
How to use the Timestamp Converter
- To read a timestamp, paste it into Unix timestamp — seconds (10 digits) or milliseconds (13 digits) are detected automatically. Press Now to load the current time.
- Read the date in your local time and in UTC.
- To go the other way, pick a date and time under Date → Timestamp and copy the value in seconds or milliseconds.
About the Timestamp Converter
A Unix timestamp counts the number of seconds (or, increasingly, milliseconds) that have elapsed since January 1, 1970, 00:00:00 UTC — the 'Unix epoch'. It's the standard way computers store and compare points in time internally, since APIs, databases, and log files often show a raw number like 1700000000 instead of a human-readable date. This tool converts that number into a readable date and time, and does the reverse too.
Paste a timestamp and it automatically detects whether it's in seconds or milliseconds based on its magnitude, then shows the equivalent date in both your browser's local timezone and UTC, along with a friendly relative time like '3 hours ago'. The reverse panel does the opposite: pick a date and time, and it returns the matching Unix timestamp in both seconds and milliseconds — useful when you need to hard-code a timestamp for an API request or database query.
Worked example
Example: entering the timestamp 1700000000 is automatically detected as seconds (since it's below the 11-digit millisecond threshold) and converts to November 14, 2023, 22:13:20 UTC — the same value entered as 1700000000000 is detected as milliseconds and converts to the exact same moment.
Getting the current timestamp in code
Languages disagree on units, which is the source of most timestamp bugs. JavaScript's Date.now() returns milliseconds, so use Math.floor(Date.now() / 1000) for seconds. Python's time.time() returns seconds as a decimal number. On Linux and macOS, date +%s prints seconds. In PostgreSQL, extract(epoch from now()) gives seconds. When a timestamp from one system shows a date in 1970 or thousands of years in the future, the units are almost certainly mixed up.
Edge cases worth knowing
- Microseconds and nanoseconds: some databases and tracing tools use 16- or 19-digit timestamps. This converter reads any value with 12 or more digits as milliseconds, so divide by 1,000 (or 1,000,000) first.
- Negative timestamps are dates before 1970 and are accepted here: −86400 is December 31, 1969.
- The year 2038 problem: systems that store seconds in a signed 32-bit integer overflow after 2,147,483,647, which is January 19, 2038, at 03:14:07 UTC.
- Leap seconds aren't counted. Unix time treats every day as exactly 86,400 seconds, which keeps arithmetic simple.
Store in UTC, display in local time
A timestamp is the same instant everywhere, which makes it ideal for storage and comparisons. Convert to local time only at the moment you display it, ideally using the viewer's timezone. Problems start when someone stores a local wall-clock time without its timezone: during daylight-saving changes, some local times happen twice and others never happen at all. If you need to keep a human-readable date, ISO 8601 with an offset, such as 2026-03-29T01:30:00Z, is unambiguous.
Frequently asked questions
- How does the tool know if my timestamp is in seconds or milliseconds?
- It checks the number's magnitude: Unix timestamps in seconds for dates in the current era are 10 digits long, while the same moment in milliseconds is 13 digits (1,000 times larger). Any value below roughly 100 billion is treated as seconds; anything at or above that is treated as milliseconds.
- Why do I see two different times — local and UTC?
- A Unix timestamp represents one exact instant in time everywhere in the world, but the wall-clock time it corresponds to depends on the timezone you're viewing it from. UTC (Coordinated Universal Time) is the timezone-independent reference most systems log internally; your local time is that same instant adjusted for your browser's timezone and daylight saving rules, which is usually what you actually want to read.
- What's the 'Now' button for?
- It fills the timestamp field with the current Unix time in seconds, which is a quick way to see what 'right now' looks like as a raw timestamp, or as a starting point before adjusting it manually.
- Can I convert a future or past date into a timestamp?
- Yes — the 'Date → Timestamp' section accepts any date and time, past or future, and returns the corresponding Unix timestamp in both seconds and milliseconds, calculated from your browser's local timezone.