Unix Timestamp Converter
Convert Unix timestamps to dates and back, seconds or milliseconds
What is Unix Timestamp Converter?
A Unix timestamp converter that translates between epoch timestamps and human-readable dates in both directions. It detects automatically whether a value is 10 digits (seconds) or 13 digits (milliseconds) and shows the result in both your local time zone and UTC. Every conversion runs in the browser, so the tool works offline.
How to use Unix Timestamp Converter
- 1Paste a timestamp — the tool infers the unit from the number of digits.
- 2Or type a date string to convert in the opposite direction and get the timestamp.
- 3Compare the local-time and UTC columns side by side to rule out a time zone misreading.
- 4Hit "Now" to grab the current timestamp instantly.
How do I do this in code?
Use the tool above for one-off work; for anything you repeat, move it into a script or your project.
// Current timestamp in milliseconds
Date.now();
// Seconds → Date
new Date(1767225600 * 1000).toISOString();
// Date → seconds
Math.floor(new Date('2026-01-01T00:00:00Z').getTime() / 1000);Common errors and how to fix them
| Symptom | Cause | Fix |
|---|---|---|
| The time is off by exactly a few hours | One side parses the value as UTC while the other applies a local time zone offset. | Standardise on ISO 8601 strings that carry an explicit offset (ending in Z or +08:00). |
| The date shows up somewhere in 1970 | A seconds-based timestamp was passed where milliseconds were expected, so the value is 1000x too small. | Confirm the unit and multiply seconds by 1000 before handing the value to Date. |
Frequently asked questions
What is the difference between a 10-digit and a 13-digit timestamp?+
Ten digits means seconds since the Unix epoch; thirteen digits means milliseconds. Traditional Unix interfaces and most backend APIs use seconds, while Date.now() in JavaScript returns milliseconds. Mixing the two lands you in 1970 or in the far future, so make the unit explicit in your API documentation.
Do I still need to worry about the Year 2038 problem?+
Only if something in your stack stores seconds in a signed 32-bit integer, which overflows on 19 January 2038. Modern languages and databases have moved to 64-bit time, but legacy systems, embedded devices, and hand-rolled C structs are still worth auditing for field width.
Related tools
All toolsTimezone Converter
Compare a time across several zones, daylight saving handled for you
Date Difference Calculator
Calculate the gap between dates, including business days
Cron Expression Parser
Parse cron expressions and preview the next run times
Number Base Converter
Convert between binary, octal, decimal, and hexadecimal
Byte Size Converter
Convert storage units, keeping base 1024 and base 1000 apart
Unit Converter
Convert length, weight, area, volume, and speed