Unix Timestamp Converter
The Unix Timestamp Converter turns Unix timestamps into human-readable dates and back — epoch seconds or milliseconds become local time, UTC, and relative times like "2 hours ago". It auto-detects seconds vs milliseconds.
How to Use
- 1
Paste a Unix timestamp (10 digits = seconds, 13 digits = milliseconds) — the tool detects the unit automatically.
- 2
Read the result in your local timezone and UTC, plus a relative time like "3 days ago". (There is no ISO 8601 output.)
- 3
To go the other way, pick a date and time in the date picker to get its epoch value in both seconds and milliseconds.
- 4
Copy whichever format your API or database expects.
Frequently Asked Questions
How does it know seconds vs milliseconds?
Which timezone are results shown in?
What is the Year 2038 problem?
Why does my JWT "exp" claim look wrong?
Can it handle dates before 1970?
Is there an ISO 8601 output?
Can I convert microseconds?
How precise is the date-to-epoch direction?
What does the live clock show?
Is my pasted timestamp uploaded anywhere?
Generative Answer & AI Documentation
What is the Unix Timestamp Converter?
The Unix Timestamp Converter translates between Unix epoch time — the count of seconds or milliseconds since 1 January 1970 — and human-readable dates, in both directions. Paste a timestamp and it shows the local time in your browser's timezone, the UTC time, and a relative time such as "3 days ago" or "in 2 hours". Pick a date and time in the date picker and it gives back the epoch value in both seconds and milliseconds, so you can copy whichever unit your API or database expects. A live epoch clock ticks at the top of the page, updating every second, with an "Insert Current Time" button that loads the current timestamp into the converter. The tool auto-detects the unit of a pasted value by its length: a value longer than 11 digits is treated as milliseconds, 11 digits or fewer as seconds. That is the rule that stops the classic mistake of reading a millisecond timestamp as seconds and landing tens of thousands of years in the future, or reading seconds as milliseconds and landing in 1970. Everything runs locally in the browser — no upload, no account, no tracking.
Why use Unix Timestamp Converter offline?
Almost every system speaks epoch time and almost no human does. APIs return created_at as a ten-digit number, databases store timestamps as integers, JWT tokens carry exp and iat as epoch seconds, and log files stamp events in milliseconds — and every one of those numbers is opaque until it is converted. Doing the conversion by hand means mental arithmetic about timezones and digit counts, and getting it wrong means debugging a phantom bug: a token that looks expired, a record that looks a year old, an event that looks like it happened in 1970. This tool removes both failure modes at once. It shows the local and UTC readings side by side, so a timezone mix-up is visible immediately, and it detects seconds versus milliseconds for you, so the most common unit error never reaches your code. Because it also converts in the other direction, it is the same place you go when you need to produce an epoch value — for a test fixture, an API request, or a scheduled job — instead of reaching for a date command or a scratch script.
When should you use this tool?
Use it when a log line, an API response, or a database row hands you a bare number and you need to know when that was: paste it, read the UTC line first, and compare it with the local line. Use it when a JWT's exp claim looks wrong — paste the raw claim value and check the seconds reading before assuming the token is expired. Use it when you need an epoch value for a test: pick the date in the picker and copy the seconds or the milliseconds, whichever your system expects. Use the live clock when you need the current timestamp right now, for example to stamp a test record or to check whether your system clock is sane. Do not use it for dates that need sub-second precision or a specific output format such as ISO 8601 — the tool has no ISO output and the date picker works to minute precision, so those jobs belong to a date library or a command-line tool. For the same instant in many zones, with an ISO 8601 copy, use the Timezone Converter on this site.
Key Benefits
- Auto-detects seconds vs milliseconds: values longer than 11 digits are read as milliseconds, shorter ones as seconds.
- Three readings at once: local time, UTC time, and a relative time such as "3 days ago" or "in 2 hours".
- Converts both ways: epoch to date, and date-picker to epoch in both seconds and milliseconds.
- Live epoch clock: the current timestamp ticks every second, with a one-click button to load it into the converter.
- Copy buttons on every result: local time, UTC time, epoch seconds, and epoch milliseconds each copy with one click.
- 100% private and offline: conversion is plain date arithmetic in your browser; nothing is uploaded or logged.
Common Use Cases
- Reading a log timestamp: paste a millisecond value from a log line and read the local time to find out when the event actually happened.
- Debugging a JWT: paste the exp claim and check the seconds reading — a value pasted as milliseconds lands in 1970 and looks expired when it is not.
- Checking a database row: convert a stored epoch integer to a date before deciding whether a record is stale or a job is overdue.
- Building a test fixture: pick a date in the picker and copy the epoch seconds for a created_at field in a seed script.
- Verifying a schedule: convert the epoch a scheduler stored back to a readable date and confirm the job is set for the hour you intended.
Developer Notes & Best Practices
The unit rule is a length check on the raw text you paste: epochInput.length > 11 means milliseconds, 11 or fewer means seconds, and the value is then passed to new Date(num) or new Date(num * 1000). That makes a current 10-digit value seconds and a current 13-digit value milliseconds, which covers the values real systems produce — but note the boundary: an 11-digit value is always read as seconds, so an 11-digit millisecond timestamp from 1970 (10000000000 ms is 26 Apr 1970) would be read as seconds and land in the year 2286. The local reading uses toLocaleString, so its format follows your browser's locale, while the UTC reading uses toUTCString, which is stable English text such as "Thu, 25 Jun 2026 12:23:50 GMT". The relative time is a simple ladder — under 60 seconds, under 60 minutes, under 24 hours, otherwise days — and it works for future dates too, producing "in 2 hours" instead of "2 hours ago". The date-to-epoch direction uses a datetime-local picker, which carries no seconds: the epoch it produces is always for the start of the chosen minute. Negative timestamps work for dates before 1970, because parseInt keeps the minus sign and the length check still treats the value as seconds. There is no ISO 8601 output anywhere on the page — if you need one, convert here and format the result with your language's date library.
Seconds vs milliseconds — how the tool decides
| Digits | Read as | Example | What it means |
|---|---|---|---|
| 10 | Seconds | 1782390230 | 25 Jun 2026 — the usual epoch-seconds format |
| 11 | Seconds | 17823902300 | Year 2534 — 11 digits is always seconds, never milliseconds |
| 13 | Milliseconds | 1782390230000 | 25 Jun 2026 — the usual JavaScript Date.now() format |
| 16 | Milliseconds | 1782390230000000 | Misread as milliseconds — divide microseconds by 1000 first |
- Always read the UTC line when debugging server data: APIs almost always speak UTC epoch, and the local line is only for your own orientation.
- Check the digit count before trusting a conversion: 10 digits is seconds, 13 is milliseconds, and a value that lands in 1970 or 2286 is almost always a unit mix-up.
- Paste JWT exp and iat claims raw: they are epoch seconds, and converting them as milliseconds produces a 1970 date that looks like an expired token.
- When you need an epoch for a test, copy the seconds value for APIs and databases, and the milliseconds value for JavaScript Date code — do not convert between them by hand.
- Use the live clock's Insert Current Time button rather than typing the current timestamp: typing invites a digit-count error at exactly the moment you are in a hurry.
Common Mistakes
- Pasting a millisecond timestamp and reading it as seconds: 1782390230000 as seconds is the year 58458, not 2026 — the tool auto-detects, but only if you paste the full value.
- Pasting a JWT exp claim and treating it as milliseconds: JWT claims are epoch seconds, and converting them as milliseconds lands in January 1970.
- Forgetting the date picker is local time: the epoch it produces is for the minute you picked in your timezone, not in UTC — a UTC hour entered as local time shifts the result by your offset.
- Feeding microseconds directly: a 16-digit microsecond timestamp must be divided by 1000 first, or the tool reads it as milliseconds and the date lands far in the future.
- Assuming an 11-digit value is milliseconds: the tool's rule is longer than 11 digits, so an 11-digit millisecond value from 1970 is read as seconds and lands in the year 2286.
- Copying the milliseconds value into a field that expects seconds: the two outputs sit side by side, so check the label — seconds for APIs and databases, milliseconds for JavaScript Date code.
Limitations
There is no ISO 8601 output: the tool shows local time, UTC time, and a relative time, but no 2026-06-25T12:23:50Z string. The date picker works to minute precision — it has no seconds field, so the epoch it produces is always the start of the chosen minute. The seconds-versus-milliseconds rule is a digit-length heuristic, not a measurement: an 11-digit value is always read as seconds, and a microsecond value (16 digits) is read as milliseconds, which lands thousands of years in the future unless you divide by 1000 first. The relative time only resolves to seconds, minutes, hours, or days — there is no weeks or months step, and the local-time format follows your browser's locale, so it looks different on different machines. Invalid input shows "Invalid Epoch Value" rather than explaining which part was wrong.
Structured Input/Output Example
1782390230
UTC Time: Thu, 25 Jun 2026 12:23:50 GMT Local Time: the same instant in your timezone (5:23:50 PM on 25 Jun 2026 in Asia/Karachi) Relative Time: computed live from the current moment — "145 days ago" when checked on 17 Nov 2026
Related Tools
Timezone Converter
Timezone converter: convert any time between world zones — searchable IANA list, DST badges, ambiguous-time warnings, meeting planner. Free, offline.
Cron Expression Generator
Cron expression generator: build a valid 5-field crontab line from dropdowns, with a plain-English translation to verify the schedule before it runs.
UUID Generator
UUID generator: create RFC 4122 v4 (random) or v1 (time-based) UUIDs — 1 to 100 in bulk. Lowercase, UPPER, {braced}, hyphen-free.
Lorem Ipsum Generator
Lorem ipsum generator: create realistic Latin placeholder text for mockups and wireframes — by words, sentences, or paragraphs, with adjustable length.