Paste any Unix timestamp, get a readable date instantly
Drop a raw epoch number into the box above and this Unix timestamp converter turns it into a human-readable date and time — in any timezone you need. It works the other way too: pick or type a date and get the epoch value back in seconds or milliseconds.
Everything runs inside your browser. No data is sent to a server, so timestamps from logs, databases, or internal systems stay completely private.
How to use it
- Epoch → date: paste your timestamp (e.g.
1717200000) into the top field and the readable date appears immediately. - Date → epoch: switch to the date input, pick your date and time, and the epoch value is shown below.
- Choose a timezone: use the timezone dropdown to see the local equivalent — UTC is the default.
- Milliseconds: if your number is 13 digits long, tick Milliseconds so the tool divides by 1000 before converting.
- Batch convert: paste multiple timestamps (one per line) to convert them all at once.
Worked example
Say you see this value in a server log: 1717200000. Paste it in and you get:
| Input (epoch) | Output (UTC) | Output (US/Eastern) |
|---|---|---|
1717200000 | 2024-06-01 00:00:00 UTC | 2024-05-31 20:00:00 EDT |
Going the other way: enter 2024-06-01 00:00:00 UTC and the tool returns 1717200000 — ready to paste back into a database field, an API call, or a script.
A 13-digit number like 1717200000000 is the same moment in milliseconds (used by JavaScript, Java, and many REST APIs). Tick the milliseconds option and the converter handles it correctly.
How to convert epoch timestamps in code
When you need this inside a script rather than the browser, here are the one-liners you actually need:
Python
import datetime
# Epoch seconds → readable UTC date
epoch = 1717200000
dt = datetime.datetime.utcfromtimestamp(epoch)
print(dt) # 2024-06-01 00:00:00
# Readable date → epoch seconds
dt2 = datetime.datetime(2024, 6, 1, 0, 0, 0, tzinfo=datetime.timezone.utc)
print(int(dt2.timestamp())) # 1717200000
JavaScript
// Epoch milliseconds → readable date
const epoch = 1717200000000; // JavaScript uses ms by default
console.log(new Date(epoch).toISOString()); // '2024-06-01T00:00:00.000Z'
// Readable date → epoch milliseconds
console.log(new Date('2024-06-01T00:00:00Z').getTime()); // 1717200000000
// Epoch seconds → ms (if your source gives seconds, not ms)
console.log(new Date(1717200000 * 1000).toISOString()); // '2024-06-01T00:00:00.000Z'
How it works — the quick version
A Unix timestamp (also called an epoch timestamp or POSIX time) is simply a count of seconds since 1970-01-01 00:00:00 UTC — a fixed reference point called the epoch. That single number represents the same instant everywhere on Earth, regardless of timezone.
Converting it to a readable date means adding those seconds to the epoch, then optionally shifting by a timezone offset. Converting back reverses that arithmetic. There is no ambiguity — one number, one moment in time.
The POSIX standard defines exactly how this count works. MDN's Date documentation covers the JavaScript side in depth.
Seconds vs. milliseconds — and the year-2038 limit
Seconds (10 digits) are the Unix default — used by Linux, macOS, most databases, and server-side languages. Milliseconds (13 digits) are common in JavaScript, Java, and many modern APIs because they give sub-second precision.
A quick way to tell which you have: if the number starts with 17... and has 10 digits, it's seconds. If it has 13 digits, it's milliseconds. The converter detects this automatically, but you can also set it manually.
The year-2038 problem: systems that store the timestamp as a signed 32-bit integer can only count up to 2147483647 — which is 2038-01-19 03:14:07 UTC. After that, a 32-bit counter overflows. Modern 64-bit systems don't have this limit, but it's worth knowing if you work with legacy code or embedded systems.
When to use this converter — and when not to
- Use it to debug logs, API responses, database fields, or any raw number that represents a moment in time.
- Use it when you need to check what a specific epoch value actually means in your local time or another timezone.
- Use it to generate the correct epoch value for an API parameter or database insert.
- Don't use it for durations — e.g.
86400is one day in seconds, not a date. Epoch arithmetic works on absolute moments, not relative spans. - Don't use it for ISO 8601 strings like
2024-06-01T00:00:00Zthat are already human-readable — those don't need conversion, just parsing.
Bottom line: any raw number you suspect is a timestamp can be decoded here in seconds. Paste it above and see what it means — no sign-up, no upload, no waiting.